zoukankan      html  css  js  c++  java
  • Com_Select.cs

    using System.Text;
    
    namespace CMSC.OA.Web.Com.Class
    {
        public class Com_Select
        {
            /// <summary>
            /// 获取日期
            /// </summary>
            public static StringBuilder SelectDateScript(string pageframe)
            {
                #region SelectDateScript
                StringBuilder js = new StringBuilder();
                string parentLayer = pageframe;
                string parentFrame = pageframe + "Frame";
    
                js.Append(@"function selectDate(obj,fn,row) {");
                js.Append(@"var layer = rootElement.CMSC.$$(""LayerForm"");");
                js.Append(@"layer.LayerId.value = ""SelectDate"";");
                js.Append(@"layer.Permit.value = ""FreeView"";");
                js.Append(@"layer.LayerTitle.value = ""选择日期"";");
                js.Append(@"layer.CanMax.value = false;");
                js.Append(@"layer.LayerUrl.value = '/Com/Select/SelectDate.aspx?pageframe=" + parentFrame + @"&obj='+obj+'&fn='+fn+'&row='+row;");
                js.Append(@"layer.Padding.value = 0;");
                js.Append(@"layer.LayerWidth.value = 320;");
                js.Append(@"layer.LayerHeight.value = 290;");
                js.Append(@"layer.submit();");
                js.Append(@"}");
    
                js.Append(@"function setDate(obj,str,row) {");
                js.Append(@"CMSC.$$(obj).value = str;");
                js.Append(@"if(row>0)CMSCTableEdit.checkEditRow(row);");
                js.Append(@"}");
    
                return js;
                #endregion
            }
    
            /// <summary>
            /// 获取机构部门
            /// </summary>
            public static StringBuilder SelectOrgScript(string pageframe)
            {
                #region SelectOrgScript
                StringBuilder js = new StringBuilder();
                pageframe = pageframe + "Frame";
    
                js.Append(@"function selectOrg(obj,fn,row) {");
                js.Append(@"var layer = rootElement.CMSC.$$(""LayerForm"");");
                js.Append(@"layer.LayerId.value = ""SelectOrg"";");
                js.Append(@"layer.Permit.value = ""FreeView"";");
                js.Append(@"layer.LayerTitle.value  = ""选择部门"";");
                js.Append(@"layer.CanMax.value  = false;");
                js.Append(@"layer.LayerUrl.value  = '/Com/Select/SelectOrg.aspx?pageframe=" + pageframe + @"&obj='+obj+'&fn='+fn+'&row='+row;");
                js.Append(@"layer.Padding.value  = 20;");
                js.Append(@"layer.LayerWidth.value  = 1000;");
                js.Append(@"layer.LayerHeight.value  = 650;");
                js.Append(@"layer.submit();");
                js.Append(@"}");
    
                js.Append(@"function setOrg(obj,str,row) {");
                js.Append(@"var objlist = obj.split('|');");
                js.Append(@"var strlist = str.split('|');");
                js.Append(@"if(objlist.length==4 && strlist.length==2){");
                js.Append(@"if(objlist[0] != """") CMSC.$$(objlist[0]).value = ""0"";");
                js.Append(@"if(objlist[1] != """") CMSC.$$(objlist[1]).value = """";");
                js.Append(@"if(objlist[2] != """") CMSC.$$(objlist[2]).value = strlist[0];");
                js.Append(@"if(objlist[3] != """") CMSC.$$(objlist[3]).value = strlist[1];");
                js.Append(@"}");
                js.Append(@"}");
    
                return js;
                #endregion
            }
    
            /// <summary>
            /// 获取员工
            /// </summary>
            public static StringBuilder SelectUserScript(string pageframe)
            {
                #region SelectUserScript
                StringBuilder js = new StringBuilder();
                pageframe = pageframe + "Frame";
    
                js.Append(@"function selectUser(obj,fn,row) {");
                js.Append(@"var syscode = CMSC.$$(""SysCode"").value;");
                js.Append(@"var layer = rootElement.CMSC.$$(""LayerForm"");");
                js.Append(@"layer.LayerId.value = ""SelectUser"";");
                js.Append(@"layer.Permit.value = ""FreeView"";");
                js.Append(@"layer.LayerTitle.value  = ""选择员工"";");
                js.Append(@"layer.CanMax.value  = false;");
                js.Append(@"layer.LayerUrl.value  = '/Com/Select/SelectUser.aspx?pageframe=" + pageframe + @"&obj='+obj+'&fn='+fn+'&row='+row+'&syscode='+syscode;");
                js.Append(@"layer.Padding.value  = 20;");
                js.Append(@"layer.LayerWidth.value  = 1000;");
                js.Append(@"layer.LayerHeight.value  = 650;");
                js.Append(@"layer.submit();");
                js.Append(@"}");
    
                js.Append(@"function setUser(obj,str,row) {");
                js.Append(@"var objlist = obj.split('|');");
                js.Append(@"var strlist = str.split('|');");
                js.Append(@"if(objlist.length==5 && strlist.length==5){");
                js.Append(@"if(objlist[0] != """") CMSC.$$(objlist[0]).value = strlist[0];");
                js.Append(@"if(objlist[1] != """") CMSC.$$(objlist[1]).value = strlist[1];");
                js.Append(@"if(objlist[2] != """") CMSC.$$(objlist[2]).value = strlist[2];");
                js.Append(@"if(objlist[3] != """") CMSC.$$(objlist[3]).value = strlist[3];");
                js.Append(@"if(objlist[4] != """") CMSC.$$(objlist[4]).value = strlist[4];");
                js.Append(@"}");
                js.Append(@"}");
    
                js.Append(@"function setUserRow(obj,str,row) {");
                js.Append(@"var strlist = str.split('|');");
                js.Append(@"if(strlist!=null && strlist.length==5){");
                js.Append(@"CMSC.$$(""RowKey_""+row).value = strlist[0];");
                js.Append(@"CMSC.$$(""UserId_""+row).value = strlist[0];");
                js.Append(@"CMSC.$$(""TrueName_""+row).value = strlist[1];");
                js.Append(@"CMSC.$$(""SysCode_""+row).value = strlist[2];");
                js.Append(@"CMSC.$$(""OrgName_""+row).value = strlist[3];");
                js.Append(@"if(row>0)CMSCTableEdit.checkEditRow(row);");
                js.Append(@"}");
                js.Append(@"}");
    
                return js;
                #endregion
            }
    
            /// <summary>
            /// 获取地区
            /// </summary>
            public static StringBuilder SelectAreaScript(string pageframe)
            {
                #region SelectAreaScript
                StringBuilder js = new StringBuilder();
                pageframe = pageframe + "Frame";
    
                js.Append(@"function selectArea(obj,fn,row) {");
                js.Append(@"var layer = rootElement.CMSC.$$(""LayerForm"");");
                js.Append(@"layer.LayerId.value = ""SelectArea"";");
                js.Append(@"layer.Permit.value = ""FreeView"";");
                js.Append(@"layer.LayerTitle.value  = ""选择地区"";");
                js.Append(@"layer.CanMax.value  = false;");
                js.Append(@"layer.LayerUrl.value  = '/Com/Select/SelectArea.aspx?pageframe=" + pageframe + @"&obj='+obj+'&fn='+fn+'&row='+row;");
                js.Append(@"layer.Padding.value  = 20;");
                js.Append(@"layer.LayerWidth.value  = 1000;");
                js.Append(@"layer.LayerHeight.value  = 650;");
                js.Append(@"layer.submit();");
                js.Append(@"}");
    
                js.Append(@"function setArea(obj,str,row) {");
                js.Append(@"var objlist = obj.split('|');");
                js.Append(@"var strlist = str.split('|');");
                js.Append(@"if(objlist.length==2 && strlist.length==2){");
                js.Append(@"if(objlist[0] != """") CMSC.$$(objlist[0]).value = strlist[0];");
                js.Append(@"if(objlist[1] != """") CMSC.$$(objlist[1]).value = strlist[1];");
                js.Append(@"}");
                js.Append(@"}");
    
                return js;
                #endregion
            }
    
        }
    }
  • 相关阅读:
    kafka_consumer3->spark_master
    为什么.NET感觉上比Java差一点
    学习Scala: 初学者应该了解的知识
    函数式编程 : 一个程序猿进化的故事
    Scala underscore的用途
    不变(Invariant), 协变(Covarinat), 逆变(Contravariant) : 一个程序猿进化的故事
    Scala Collection简介
    C# on Visual Studio Code
    我的Machine Learning学习之路
    Scala on Visual Studio Code
  • 原文地址:https://www.cnblogs.com/yueyuepeng/p/7131809.html
Copyright © 2011-2022 走看看