Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UserID   = CurrentUser.ID;
        UserName = CurrentUser.Name;

        if (Request["RecID"] != null)
        {
            RecID = Request["RecID"].ToString();
        }
        if (Request["keyWordValue"] != null)
        {
            keyWordValue = Request["keyWordValue"].ToString();
        }
        if (Request["SearchType"] != null)
        {
            SearchType = Request["SearchType"].ToString();
        }
        if (Request["转移联单编号"] != null)
        {
            FormNumber = Request["转移联单编号"].ToString();
        }
        WebServices.Services Resource = new WebServices.Services();
        DataTable            dt       = Resource.GetDataListByResID("564794299148", "", "AND 联单编号='" + FormNumber + "'", UserID).Tables[0];

        if (dt != null && dt.Rows.Count > 0)
        {
            ProduceUnit = dt.Rows[0]["废物产生单位"].ToString();
            WasteName   = dt.Rows[0]["废物名称"].ToString();
            WasteCode   = dt.Rows[0]["废物代码"].ToString();
            Position    = dt.Rows[0]["存放位置"].ToString();
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadScript("");
        UserID = CurrentUser.ID;
        if (CurrentUser.DepartmentName != "系统管理员" && CurrentUser.ID != "sysuser")
        {
            Response.Redirect("../../login.aspx", true);
            return;
        }
        if (Request.QueryString["SearchType"] != null)
        {
            SearchType = Request.QueryString["SearchType"].ToString();
        }
        if (Request.QueryString["NodeID"] != null)
        {
            NodeID = Request.QueryString["NodeID"].ToString();
        }

        WebServices.Services Resource = new WebServices.Services();
        ResID = Resource.GetResourceIDByTableName("SysSettings");


        string strSql = "  select RT_TAB1_RESID ResID,'ListConfig' keyWordValue ,RT_TAB2_RESID ChildResID,Res.NAME ChildResName,(D1.CD_DISPNAME+'='+D2.CD_DISPNAME) 主子表关联字段 FROM [CMS_RELATED_TABLE] R " +
                        " Join CMS_RESOURCE  Res on R.RT_TAB2_RESID=Res.ID" +
                        "  join CMS_TABLE_DEFINE D1 on D1.CD_RESID=R.RT_TAB1_RESID and D1.CD_COLNAME=R.RT_TAB1_COLNAME " +
                        "  join CMS_TABLE_DEFINE D2 on D2.CD_RESID=R.RT_TAB2_RESID and D2.CD_COLNAME=R.RT_TAB2_COLNAME  " +
                        "   where RT_TAB1_RESID=" + ResID + " order by RT_SHOWORDER";

        string[]  changePassWord = Common.getChangePassWord();
        DataTable TableList      = Resource.SelectData(strSql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];

        RepTabList.DataSource = TableList;
        RepTabList.DataBind();
    }
Пример #3
0
    public static WebServices.FieldInfo[] GetFieldList(string resid, string dataJson, ref string RecID)
    {
        WebServices.Services    Resource      = new WebServices.Services();
        WebServices.FieldInfo[] FieldListInfo = { };
        Field[]   fl = Resource.GetFieldListAll(resid);
        DataTable dt = CommonMethod.JsonToDataTable(dataJson);

        if (dt.Columns.Contains("ID") && dt.Rows.Count > 0)
        {
            RecID = dt.Rows[0]["ID"].ToString();
        }
        List <FieldInfo> fieldList = CommonMethod.GetFieldList(dt.Rows[0]);
        int i = 0;

        foreach (WebServices.Field f in fl)
        {
            for (int index = 0; index <= fieldList.Count - 1; index++)
            {
                FieldInfo fieldItem = fieldList[index];
                if (fieldItem.FieldDescription == f.Description)
                {
                    FieldInfo fi = new FieldInfo();
                    fi.FieldDescription = f.Description;
                    fi.FieldName        = f.Name;
                    fi.FieldValue       = fieldItem.FieldValue;
                    Array.Resize(ref FieldListInfo, i + 1);
                    FieldListInfo[i] = fi;
                    i += 1; break; // TODO: might not be correct. Was :   Exit For;
                }
            }
        }
        return(FieldListInfo);
    }
Пример #4
0
    protected string WBXMBH   = ""; //外包项目编号

    protected void Page_Load(object sender, EventArgs e)
    {
        WebServices.Services Resource = new WebServices.Services();
        UserID = CurrentUser.ID;
        if (Request["RecID"] != null && Request["RecID"].ToString() != "")
        {
            RecID = Request["RecID"].ToString();
            DataTable dt = Resource.GetDataListByResID(ResID, "", " and ID=" + RecID, UserID).Tables[0];
            if (dt != null && dt.Rows.Count > 0)
            {
                LCBH    = dt.Rows[0]["流程编号"].ToString();    //流程编号
                SQRQ    = dt.Rows[0]["申请日期"].ToString();    //申请日期
                SQR     = dt.Rows[0]["申请人"].ToString();     //申请人
                CGJEHJ  = dt.Rows[0]["采购金额合计"].ToString();  //采购金额合计
                QKSY    = dt.Rows[0]["请款事由"].ToString();    //请款事由
                QKJE    = dt.Rows[0]["请款金额"].ToString();    //请款金额
                TD      = dt.Rows[0]["退单"].ToString();      //退单
                SFYHK   = dt.Rows[0]["是否已汇款"].ToString();   //是否已汇款
                SFYZWBX = dt.Rows[0]["是否已转为报销"].ToString(); //是否已转为报销
                GLBXDBH = dt.Rows[0]["关联报销单编号"].ToString(); //关联报销单编号
                BXKMDM  = dt.Rows[0]["报销科目代码"].ToString();  //报销科目代码
                BXKMMC  = dt.Rows[0]["报销科目名称"].ToString();  //报销科目名称
                WBXMBH  = dt.Rows[0]["外包项目编号"].ToString();  //外包项目编号
            }
        }
    }
Пример #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CurrentUserID = CurrentUser.ID;
        NeedUserIDStr = "readonly='readonly'";

        ActionType = "XZGL";

        ResID      = Request["ResID"] == null ? "" : Request["ResID"].ToString();
        RecID      = Request["RecID"] == null ? "" : Request["RecID"].ToString();
        KeyWord    = Request["keyWordValue"] == null ? "" : Request["keyWordValue"].ToString();
        NodeID     = Request["NodeID"] == null || string.IsNullOrWhiteSpace(Request["NodeID"].ToString()) ? 0 : Convert.ToInt64(Request["NodeID"].ToString());
        ActionType = Request["ActionType"] == null ? "" : Request["ActionType"].ToString();
        OpenDiv    = Request["OpenDiv"] == null ? "" : Request["OpenDiv"].ToString();
        DeptID     = Request["DeptID"] == null ? "" : Request["DeptID"].ToString();

        NoSelectDeptID = Request["NoSelectDeptID"] == null ? "" : Request["NoSelectDeptID"].ToString();

        if (!string.IsNullOrWhiteSpace(DeptID))
        {
            DeptName = Common.GetOneRowValueBySQL("select ID,PID , NAME AS Name ,DEP_TYPE AS [Type]  FROM Cms_Department where ID=" + DeptID, "Name");
        }
        else if (!string.IsNullOrWhiteSpace(RecID))
        {
            WebServices.Services oServices = new WebServices.Services();
            DeptID   = Common.GetOneRowValueBySQL("select * FROM " + oServices.GetTableNameByResourceid(ResID) + " where ID=" + RecID, "DeparmentID");
            DeptName = Common.GetOneRowValueBySQL("select ID,PID , NAME AS Name ,DEP_TYPE AS [Type]  FROM Cms_Department where ID=" + DeptID, "Name");
        }

        if (ActionType == "edit")
        {
            SaveType = "1";
        }
    }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (CurrentUser.DepartmentName != "系统管理员" && CurrentUser.ID != "sysuser")
        {
            Response.Redirect("../../login.aspx", true);
            return;
        }
        LoadScript("");
        if (Request["ResID"] != null)
        {
            ResID = Request["ResID"];
        }
        if (Request["PID"] != null)
        {
            PID = Request["PID"];
        }
        if (Request["KeyWord"] != null)
        {
            KeyWord = Request["KeyWord"];
            WebServices.Services Resource = new WebServices.Services();
            ResID = Resource.GetResourceIDByDescription(KeyWord);
        }

        if (Request["NotShowDes"] != null)
        {
            NotShowDes = Request["NotShowDes"];
        }
    }
Пример #7
0
    //编辑谈判记录的时候进来
    protected void GetTPJLData()
    {
        string RecID = "";
        string ResID = "";

        if (Request["RecID"] != null)
        {
            RecID = Request["RecID"];
        }
        if (Request["ResID"] != null)
        {
            ResID = Request["ResID"];
        }
        WebServices.Services Resource = new WebServices.Services();
        DataTable            ppDt     = Resource.GetDataListByResourceID(ResID, false, " and id=" + RecID).Tables[0];

        Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
        timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd";
        String str = Newtonsoft.Json.JsonConvert.SerializeObject(ppDt, timeConverter);

        if (ppDt.Rows.Count > 0)
        {
            DataTable sunDt = Resource.GetDataListByResourceID("383153238947", false, " and 谈判系统编号='" + ppDt.Rows[0]["谈判系统编号"] + "'").Tables[0];
            str = str.Substring(0, str.Length - 1);
            String str1 = Newtonsoft.Json.JsonConvert.SerializeObject(sunDt, timeConverter);
            str = str + "," + str1.Substring(1, str1.Length - 1);
        }
        Response.Write(str);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["ResID"] != null)
        {
            ResID = Request["ResID"];
        }
        if (Request["PID"] != null)
        {
            PID = Request["PID"];
        }
        if (CurrentUser.DepartmentName != "系统管理员" && CurrentUser.ID != "sysuser")
        {
            Response.Redirect("../../login.aspx", true);
            return;
        }
        if (Request["KeyWord"] != null)
        {
            KeyWord = Request["KeyWord"];
            WebServices.Services Resource = new WebServices.Services();
            ResID = Resource.GetResourceIDByDescription(KeyWord);
        }

        if (Request["NotShowDes"] != null)
        {
            NotShowDes = Request["NotShowDes"];
        }

        strUrl = WebUtilities.ApplicationPath + "Base/SystemConfig/ResourceTree.aspx?ResID=&PID=-1&IsShowDefaultMenu=0&FromUrl=DictionaryList.aspx";
    }
Пример #9
0
    //通过业态名称来查询子业态名称,并返回字符串"
    protected void GetEJYT()
    {
        WebServices.Services Resource = new WebServices.Services();
        String ytValue = "";
        String ChildYT = "";

        if (Request.QueryString["ytValue"] != null)
        {
            ytValue = Request.QueryString["ytValue"];
        }
        if (ytValue != null && ytValue != "")
        {
            DataTable ejYTDt = Resource.GetDataListByResourceID("423743051439", false, " and 上级业态名称='" + ytValue + "'").Tables[0];
            if (ejYTDt.Rows.Count > 0)
            {
                for (int i = 0; i < ejYTDt.Rows.Count; i++)
                {
                    ChildYT += ejYTDt.Rows[i]["业态名称"].ToString();
                    if (i < ejYTDt.Rows.Count - 1)
                    {
                        ChildYT += ",";
                    }
                }
            }
        }
        Response.Write(ChildYT);
    }
Пример #10
0
    private string GetDataByWGJKHTS()
    {
        WebServices.Services Resource = new WebServices.Services();
        string    str = "";
        DataTable dt  = new DataTable();

        string Condition = Request["Condition"];
        string Seaxs     = Request["Seaxs"];


        string sql = "select C3_401291000526 客户全称 ,C3_551182758185 分配  from CT401290367151 ";

        sql += " WHERE  isnull(C3_551182775673,'1900-01-01') <dateadd(month,-2,GETDATE()) ";
        sql += " and isnull(C3_551182786094,'1900-01-01') <dateadd(month,-6,GETDATE())  ";
        if (Seaxs != "" && Seaxs != null)
        {
            sql += " and C3_401291000526  like '%" + Seaxs + "%'";
        }
        if (Condition != "")
        {
            sql += Condition;
        }
        sql += " order by C3_551182758185 asc,C3_401291000526 asc";
        string[] changePassWord = Common.getChangePassWord();
        dt = Resource.SelectData(sql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];
        Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
        timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd";
        str = Newtonsoft.Json.JsonConvert.SerializeObject(dt, timeConverter);

        return(str);
    }
Пример #11
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        recid = NetReusables.TimeId.GetCurrentMilliseconds().ToString();

        LoadScript("");
        keyWordValue = Request.QueryString["key"];

        // 通过参数关键字获取对象
        SysSettings sys = Common.GetSysSettingsByENKey(keyWordValue);

        oUserInfo = CurrentUser;
        if (sys != null)
        {
            ResID = sys.ResID.ToString();
            if (sys.FilterCondtion != "" && sys.FilterCondtion != null)
            {
                UserDefinedSql = Server.UrlEncode(sys.FilterCondtion);
            }
            if (Request.QueryString["SearchType"] != null)
            {
                SearchType = Request.QueryString["SearchType"].ToString();
            }
            if (Request.QueryString["NodeID"] != null)
            {
                NodeID = Request.QueryString["NodeID"].ToString();
            }
            if (Request.QueryString["MenuResID"] != null)
            {
                MenuResID = Request.QueryString["MenuResID"].ToString();
            }

            if (Request.QueryString["ParentResID"] != null)
            {
                ParentResID = Request.QueryString["ParentResID"].ToString();
            }
            if (Request.QueryString["ParentRecID"] != null)
            {
                ParentRecID = Request.QueryString["ParentRecID"].ToString();
            }
        }
        WebServices.Services Resource = new WebServices.Services();


        DataTable dt = new DataTable();

        if (CurrentUser.DepartmentName.Trim() == CommonProperty.ManageDepartmentName.Trim())
        {
            dt = Resource.GetAllPortalChildResourceList(keyWordValue);
        }
        else
        {
            dt = Resource.GetPortalChildResourceList(CurrentUser.ID, keyWordValue);
        }
        if (dt.Rows.Count == 0)
        {
            IsChild = false;
        }
        RepTabList.DataSource = dt;
        RepTabList.DataBind();
    }
Пример #12
0
    /// <summary>
    /// 根据资源ID,获取资源配置信息
    /// </summary>
    /// <param name="ResID"></param>
    /// <returns></returns>
    public static SysSettings GetSysSettingsByResID(string ResID)
    {
        SysSettings Sys = null;

        WebServices.Services Resource = new WebServices.Services();
        // string sql = "select top(1) * from SysSettings where [Value]='" + ResID + "' ";
        // DataSet ds = Resource.SelectData(sql);
        UserInfo user = CommonGetInfo.GetUser();
        DataSet  ds   = Resource.GetDataListByResID("437496952875", "", CommonMethod.FilterSql(" and 值='" + ResID + "'"), user.ID);

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                Sys              = new SysSettings();
                Sys.ShowTitle    = ds.Tables[0].Rows[0]["显示Title"].ToString();
                Sys.ENTableName  = ds.Tables[0].Rows[0]["参数关键字"].ToString();
                Sys.KeyWordValue = ds.Tables[0].Rows[0]["参数关键字"].ToString();
                Sys.ResID        = ds.Tables[0].Rows[0]["值"].ToString();

                Sys.AlignColStr    = ds.Tables[0].Rows[0]["左对齐显示字段"].ToString();
                Sys.AddUrl         = ds.Tables[0].Rows[0]["添加地址"].ToString();
                Sys.EidtUrl        = ds.Tables[0].Rows[0]["编辑地址"].ToString();
                Sys.AccessoryCol   = ds.Tables[0].Rows[0]["附件字段"].ToString();
                Sys.FJGLJD         = ds.Tables[0].Rows[0]["附件主子表关联字段"].ToString();
                Sys.AccessoryResID = ds.Tables[0].Rows[0]["附件ResID"].ToString();
                Sys.SettingsNum    = ds.Tables[0].Rows[0]["列表配置号"].ToString();
                Sys.LBLX           = ds.Tables[0].Rows[0]["列表类型"].ToString();
                Sys.DialogWidth    = ds.Tables[0].Rows[0]["弹出层宽度"].ToString() == "" ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["弹出层宽度"]);
                Sys.DialogHeight   = ds.Tables[0].Rows[0]["弹出层高度"].ToString() == "" ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["弹出层高度"]);

                Sys.DefaultOrder   = ds.Tables[0].Rows[0]["默认排序"].ToString();
                Sys.SortBy         = ds.Tables[0].Rows[0]["排序类型"].ToString();
                Sys.TableName      = ds.Tables[0].Rows[0]["数据表名称"].ToString();
                Sys.FilterCondtion = ds.Tables[0].Rows[0]["数据筛选条件"].ToString();

                DataRow dr = ds.Tables[0].Rows[0];
                Sys.IsCheckBox   = NetReusables.DbField.GetBool(ref dr, "是否显示复选框");
                Sys.IsAdd        = NetReusables.DbField.GetBool(ref dr, "启用添加");
                Sys.IsUpdate     = NetReusables.DbField.GetBool(ref dr, "启用修改");
                Sys.IsDelete     = NetReusables.DbField.GetBool(ref dr, "启用删除");
                Sys.IsExp        = NetReusables.DbField.GetBool(ref dr, "启用导出");
                Sys.IsStartWidth = NetReusables.DbField.GetBool(ref dr, "启用字段宽度设置");
                Sys.IsOrder      = NetReusables.DbField.GetBool(ref dr, "是否支持排序");
                Sys.IsRowRight   = NetReusables.DbField.GetBool(ref dr, "是否启用行过滤");
                Sys.URLTarget    = ds.Tables[0].Rows[0]["页面打开方式"].ToString();
                Sys.FootStr      = ds.Tables[0].Rows[0]["统计字段"].ToString();
                return(Sys);
            }
            else
            {
                return(Sys);
            }
        }
        else
        {
            return(Sys);
        }
    }
Пример #13
0
    //删除grid的行数据
    protected void deleteGridRow()
    {
        String ResID = Request["ResID"];
        String RecID = Request["RecID"];

        if (ResID != null && ResID != "")
        {
            WebServices.Services Resource = new WebServices.Services();
            Resource.Delete(ResID, RecID, UserID);
        }
    }
Пример #14
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        WebServices.UserInfo oEmployee = null;
        try
        {
            WebServices.Services services = new WebServices.Services();
            if (services.Login(txtUserCode.Text.Trim(), txtPwd.Text.Trim()))
            {
                oEmployee = services.GetUserInfo(txtUserCode.Text.Trim());
                string pwd = NetReusables.Encrypt.Encrypt(txtPwd.Text.Trim());
                if (oEmployee.Password == pwd || (oEmployee.Password == null && pwd == ""))
                {
                    if (oEmployee.Status)
                    {
                        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "alert('该账号已被禁用,请联系管理员!');", true);
                    }
                    else if (oEmployee.ID.ToLower().Equals("admin"))//超级管理员
                    {
                        string url = "/cmsweb/SvcLogin.aspx?targetpage=" + Server.UrlEncode("/cmsweb/cmshost/CmsFrame.aspx?cmsbodypage=/cmsweb/adminres/ResourceFrameBody.aspx") + "&user="******"&ucode=" + oEmployee.Password;
                        Response.Redirect(url, false);
                    }
                    else
                    {
                        Session["Employee"] = oEmployee;

                        //HttpCookie myCookie = new HttpCookie("EmployeeCookies");
                        //myCookie.Values["EmployeeCode"] = oEmployee.ID.Trim();
                        //Response.Cookies.Add(myCookie);

                        //不同用户登录,进入不同界面
                        if (oEmployee.ID.Trim().ToLower() == "sysuser")
                        {
                            Response.Redirect("SystemIndex.aspx", false);
                        }
                        else
                        {
                            Response.Redirect("Index.aspx", false);
                        }
                    }
                }
            }
            else
            {
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "alert('用户名或密码不正确!');", true);
            }
        }
        catch (Exception)
        {
            this.Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "alert('用户名或密码不正确!');", true);
            txtPwd.Text = "";
        }
    }
Пример #15
0
 public static DataTable PortalRights(UserInfo oUser)
 {
     WebServices.Services Resource = new WebServices.Services();
     if (_PortalRights == null)
     {
         _PortalRights = Resource.GetAllPortalOperationByResourceIDAndUserID(oUser.ID, _PortalResourceID, true);
     }
     else if (_PortalRights.Rows.Count == 0)
     {
         _PortalRights = Resource.GetAllPortalOperationByResourceIDAndUserID(oUser.ID, _PortalResourceID, true);
     }
     return(_PortalRights);
 }
Пример #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ResId   = Request.QueryString["resId"];
        KeyWord = Request.QueryString["KeyWord"] == null ? "" : Request.QueryString["KeyWord"];

        if (KeyWord != "")
        {
            //获取当前资源配置的查询字段
            WebServices.Services Resource = new WebServices.Services();
            string   strSql         = " select id,keyword,datetype,Searchcol,showCol from Sys_CXZJLB where keyword='" + KeyWord + "' order by xh asc ";
            string[] changePassWord = Common.getChangePassWord();

            dt = Resource.Query(strSql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];
        }
    }
Пример #17
0
    protected void SaveRWPFUploadInfo()
    {
        string jsonStr3    = "";
        string rcswwdResID = "393296902171";

        if (Request["jsonStr3"] != null)
        {
            jsonStr3 = Request["jsonStr3"];
        }
        Response.ContentType = "text/plain";
        Response.Charset     = "utf-8";
        HttpPostedFile file = Request.Files["Filedata"];

        WebServices.Services Resource = new WebServices.Services();

        string uploadPath = HttpContext.Current.Server.MapPath(Request["folder"]) + "\\";

        DataTable dt = (DataTable)Newtonsoft.Json.JsonConvert.DeserializeObject <DataTable>(jsonStr3);

        WebServices.FieldInfo[] FieldListInfo = new WebServices.FieldInfo[dt.Rows.Count];
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                WebServices.FieldInfo fi = new WebServices.FieldInfo();
                fi.FieldDescription = dt.Rows[i]["Description"].ToString();
                fi.FieldValue       = dt.Rows[i]["Value"].ToString();
                FieldListInfo[i]    = fi;
            }
        }
        if (file != null)
        {
            string           fileName = System.IO.Path.GetFileName(file.FileName);
            int              FileLen  = file.ContentLength;
            byte[]           FileData = new byte[FileLen];
            System.IO.Stream sr       = file.InputStream;//创建数据流对象
            sr.Read(FileData, 0, FileLen);
            sr.Close();
            Resource.UploadFile(rcswwdResID, UserID, fileName, FileData, FieldListInfo);
            //下面这句代码缺少的话,上传成功后上传队列的显示不会自动消失
            Response.Write("1");
        }
        else
        {
            Resource.UploadFile(rcswwdResID, UserID, "", null, FieldListInfo);
            Response.Write("1");
        }
    }
Пример #18
0
    protected string GetDataListBySql(string sql)
    {
        string resultStr;

        WebServices.Services Resource       = new WebServices.Services();
        string[]             changePassWord = Common.getChangePassWord();

        DataTable dt = Resource.Query(sql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];

        Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
        // //这里使用自定义日期格式,如果不使用的话,默认是ISO8601格式
        //timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss"
        timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm";
        resultStr = Newtonsoft.Json.JsonConvert.SerializeObject(dt, timeConverter);
        return(resultStr);
    }
Пример #19
0
    protected void GetEditorData()
    {
        String ResID     = Request.QueryString["ResID"];
        String RecID     = Request.QueryString["RecID"];
        string searchstr = "";

        WebServices.Services Resource = new WebServices.Services();

        if (ResID == "460222389874")
        {
            searchstr = " and DOCID ='" + RecID + "'";
        }
        else
        {
            searchstr = " and id=" + RecID;
        }

        DataTable ppDt = Resource.GetDataListByResourceID(ResID, false, searchstr).Tables[0];

        Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
        timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd";
        String str = Newtonsoft.Json.JsonConvert.SerializeObject(ppDt, timeConverter);

        //方案系统编号,加载方案扩展表的时候用 430590206015//方案扩展表的ResID
        String FAXTBH = Request.QueryString["FAXTBH"];

        if (FAXTBH != null && FAXTBH != "")
        {
            DataTable sunDt = Resource.GetDataListByResourceID("430590206015", false, " and 方案系统编号='" + FAXTBH + "'").Tables[0];
            String    str1  = Newtonsoft.Json.JsonConvert.SerializeObject(sunDt, timeConverter);
            str = str + "[#]" + str1;
            String lxrxtbh = sunDt.Rows[0]["联系人系统编号"].ToString();
            if (lxrxtbh != null && lxrxtbh != "")
            {
                //查询品牌方案关联的联系人系统编号
                DataTable lxrDt = Resource.GetDataListByResourceID("379264068953", false, " and 联系人系统编号='" + lxrxtbh + "'").Tables[0];
                String    str2  = Newtonsoft.Json.JsonConvert.SerializeObject(lxrDt, timeConverter);
                str = str + "[#]" + str2;
            }
        }
        Response.Write(str);
    }
Пример #20
0
    public static MasterTableAssociation GetChileMasterTableAssociation(string argFatherKey, string argChileKey, string argTZ, string argMasterTableAssociationID)
    {
        MasterTableAssociation child = null;

        WebServices.Services Resource       = new WebServices.Services();
        string[]             changePassWord = Common.getChangePassWord();
        DataTable            vdt            = Resource.SelectData("select * from MasterTableAssociation  where id = '" + argMasterTableAssociationID + "'", changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];

        if (vdt == null && vdt.Rows.Count == 0)
        {
            return(child);
        }

        DataRow vDr = vdt.Rows[0];

        child = new MasterTableAssociation()
        {
            MID                = vDr["id"].ToString(),
            MasterKeyWord      = vDr["MasterKeyWord"].ToString(),
            ChildKeyWord       = vDr["ChildKeyWord"].ToString(),
            ChildOrderNo       = string.IsNullOrEmpty(vDr["ChildOrderNo"].ToString()) ? 10 : Convert.ToInt32(vDr["ChildOrderNo"].ToString()),
            AllowAdd           = Convert.ToBoolean(vDr["AllowAdd"].ToString() == "1"),
            AllowEdit          = Convert.ToBoolean(vDr["AllowEdit"].ToString() == "1"),
            AllowDel           = Convert.ToBoolean(vDr["AllowDel"].ToString() == "1"),
            AllowExport        = Convert.ToBoolean(vDr["AllowExport"].ToString() == "1"),
            TZType             = vDr["TZType"].ToString(),
            LedgerConditions   = vDr["LedgerConditions"].ToString(),
            LedgerChildKey     = vDr["LedgerChildKey"].ToString(),
            RSResID            = vDr["RSResID"].ToString(),
            ChildResId         = vDr["ChildResId"].ToString(),
            DefaultSort        = vDr["DefaultSort"].ToString(),
            InitialQueryStr    = vDr["InitialQueryStr"].ToString(),
            HasLastOperation   = Convert.ToBoolean(vDr["HasLastOperation"].ToString() == "1"),
            HasFirstOperation  = Convert.ToBoolean(vDr["HasFirstOperation"].ToString() == "1"),
            ViewDepartment     = vDr["ViewDepartment"].ToString(),
            NoViewDepartment   = vDr["NoViewDepartment"].ToString(),
            ViewAccount        = vDr["ViewAccount"].ToString(),
            NoViewAccount      = vDr["NoViewAccount"].ToString(),
            ViewBaseTableResid = vDr["ViewBaseTableResid"].ToString()
        };
        return(child);
    }
Пример #21
0
    private string GetDataByWGJKHTX()
    {
        WebServices.Services Resource = new WebServices.Services();
        string    str = "";
        DataTable dt  = new DataTable();
        string    sql = "select C3_404495328556 客户全称,C3_423050441017 销售   from CT401290331886  WHERE  C3_404495328556 NOT IN ( ";

        sql += " select C3_480524157728 from CT480524075049 WHERE C3_480524183775 BETWEEN '" + DateTime.Now.AddMonths(-3).ToString("yyyy-MM-dd") + "' AND GETDATE()) ";
        if (Request["Seaxs"] != null && Request["Seaxs"].ToString() != "")
        {
            sql += " and C3_423050441017 like '%" + Request["Seaxs"].ToString() + "%'";
        }
        sql += " GROUP BY C3_404495328556 ,C3_423050441017  ORDER BY C3_423050441017 ";
        string[] changePassWord = Common.getChangePassWord();
        dt = Resource.SelectData(sql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];
        Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
        timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd";
        str = Newtonsoft.Json.JsonConvert.SerializeObject(dt, timeConverter);
        return(str);
    }
Пример #22
0
    private string GetDataByFDDXM()
    {
        WebServices.Services Resource = new WebServices.Services();
        string    str        = "";
        DataTable dt         = new DataTable();
        string    seaBegDate = Request["seaBegDate"];
        string    seaEndDate = Request["seaEndDate"];

        if (seaBegDate != null && seaBegDate != "" && seaEndDate != null && seaEndDate != "")
        {
            string sql = "SELECT   C3_316013848869 督导, COUNT(C3_285435595640) 累计新开项目, SUM(CASE WHEN ISNULL(C3_285435594890,0)=0 THEN 1 ELSE 0 END) 累计未确认项目,";
            sql += " SUM(CASE WHEN ISNULL(C3_285435594890,0)<>0 AND ISNULL(C3_332437985389,0)=0 THEN 1 ELSE 0 END) 累计已确认未开票项目";
            sql += " from CT285435593984 WHERE C3_285435594453 BETWEEN '" + Convert.ToDateTime(seaBegDate).ToString("yyyy-MM-dd") + "' AND '" + Convert.ToDateTime(seaEndDate).ToString("yyyy-MM-dd") + "' GROUP BY C3_316013848869";
            string[] changePassWord = Common.getChangePassWord();
            dt = Resource.SelectData(sql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];
            Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
            timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd";
            str = Newtonsoft.Json.JsonConvert.SerializeObject(dt, timeConverter);
        }
        return(str);
    }
Пример #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ResId   = Request.QueryString["resId"];
            KeyWord = Request.QueryString["KeyWord"] == null ? "" : Request.QueryString["KeyWord"];

            if (KeyWord != "")
            {
                //获取当前资源配置的查询字段
                WebServices.Services Resource = new WebServices.Services();
                string   strSql         = " select id,keyword,datetype,Searchcol,showCol from Sys_CXZJLB where keyword='" + KeyWord + "' order by xh asc ";
                string[] changePassWord = Common.getChangePassWord();
                dt = Resource.Query(strSql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];

                //获取当前资源配置的列表字段
                string strColSql = "   select rc.id,rc.columnName,rc.orderNum,rc.DateType,rc.keyword from ResourceColumn rc where rc.keyword='" + KeyWord + "' order by rc.orderNum asc ";
                dtCol = Resource.Query(strColSql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];
            }
        }
    }
Пример #24
0
    private string GetfDataByYSKTJ()
    {
        WebServices.Services Resource = new WebServices.Services();
        string str = "";

        if (Request["SKRQ"] != null && Request["SKRQ"] != "")
        {
            DateTime skrq = Convert.ToDateTime(Request["SKRQ"]);
            string   sql  = "select SUM(C3_401795702260) 本月回款 from CT401290354058  ";
            sql += " where Year(C3_475688833284)='" + skrq.Year + "' and MONTH(C3_475688833284)='" + skrq.Month + "';  ";
            sql += " SELECT sum(C3_403033088714) 本月开票 FROM ct401290382901  ";
            sql += " where Year(C3_404405195524)='" + skrq.Year + "' and MONTH(C3_404405195524)='" + skrq.Month + "';  ";
            sql += " SELECT sum(C3_403007677105) 三个月内应收款 FROM ct401290382901   ";
            sql += " where C3_404405195524 between   dateadd(day,-90,'" + skrq + "')  and '" + skrq + "';";
            sql += " SELECT sum(C3_403007677105) 三个月以上应收款 FROM ct401290382901  ";
            sql += " where  C3_404405195524 <   dateadd(day,-90,'" + skrq + "') ;  ";
            sql += " SELECT sum(C3_403007677105) 应收款总额 FROM ct401290382901 where  C3_404405195524 < '" + skrq + "';";
            string[] changePassWord = Common.getChangePassWord();

            DataSet   ds = Resource.Query(sql, changePassWord[0], changePassWord[1], changePassWord[2]);
            DataTable dt = new DataTable();
            dt.Columns.Add("本月回款");
            dt.Columns.Add("本月开票");
            dt.Columns.Add("三个月内合计");
            dt.Columns.Add("三个月内应收款");
            dt.Columns.Add("三个月以上应收款");
            dt.Columns.Add("应收款总额");
            dt.Rows.Add();
            dt.Rows[0]["本月回款"]     = ds.Tables[0].Rows[0]["本月回款"].ToString();
            dt.Rows[0]["本月开票"]     = ds.Tables[1].Rows[0]["本月开票"].ToString();
            dt.Rows[0]["三个月内应收款"]  = ds.Tables[2].Rows[0]["三个月内应收款"].ToString();
            dt.Rows[0]["三个月以上应收款"] = ds.Tables[3].Rows[0]["三个月以上应收款"].ToString();
            dt.Rows[0]["应收款总额"]    = ds.Tables[4].Rows[0]["应收款总额"].ToString();

            Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
            timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd";
            str = Newtonsoft.Json.JsonConvert.SerializeObject(dt, timeConverter);
        }
        return("{\"total\":1 ,\"rows\":" + str + "}");
    }
Пример #25
0
    public void Bind()
    {
        string resID = CommonProperty.PortalResourceID;

        WebServices.ResourceInfo[] ResourceInfo = null;
        WebServices.Services       Resource     = new WebServices.Services();
        string[]  changePassWord = Common.getChangePassWord();
        DataTable dt             = Resource.SelectData("select Count(1) from VIEW_WF_RECEIVEFILES  WHERE EMPCODE='" + oUserInfo.ID + "'", changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];

        if (dt.Rows.Count > 0)
        {
            DBSXNum = dt.Rows[0][0].ToString();
        }
        //获取一级导航菜单列表,如果是管理员则显示所有菜单
        if (CurrentUser.DepartmentName.Trim() == CommonProperty.ManageDepartmentName.Trim())
        {
            ResourceInfo = document.GetNextDirectoryList(resID);
        }
        else
        {
            ResourceInfo = document.GetNextPortalTreeRootByResourceIDAndUserID(oUserInfo.ID, resID);
        }

        if (ResourceInfo != null && ResourceInfo.Length > 0)
        {
            //获取第一个菜单ID
            resourceInfoID = ResourceInfo[0].ID;
            //获取第一个菜单Title
            resourceInfoTitle = ResourceInfo[0].Name;

            this.titleRepeater.DataSource = ResourceInfo;
            titleRepeater.DataBind();
        }
        else
        {
            this.Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "alert('该用户还没有分配任务权限,请先找管理员分配权限!');window.location.href='../login.aspx'", true);
        }
    }
Пример #26
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        //DataTable dt =
        WebServices.Services services       = new WebServices.Services();
        string[]             changePassWord = Common.getChangePassWord();
        DataTable            dt             = services.SelectData("select * from CMS_EMPLOYEE order by Emp_Name", changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0];

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string pass = "";
            try
            {
                pass = NetReusables.CmsEncrypt.DecryptPassword(dt.Rows[i]["EMP_PASS"].ToString());
            }
            catch (Exception)
            {
                pass = NetReusables.Encrypt.Decrypt(dt.Rows[i]["EMP_PASS"].ToString()) + "(已更新)";
            }
            dt.Rows[i]["EMP_PASS"] = pass;
        }
        GridView1.DataSource = dt;
        GridView1.DataBind();
    }
Пример #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UserID   = CurrentUser.ID;
        PassWord = CurrentUser.Password;
        string typeValue = Request.QueryString["typeValue"] == null ? "" : Request.QueryString["typeValue"];
        string json      = "";

        #region 修改密码
        if (typeValue.Equals("Updpass"))
        {
            string userId = Request.Form["userId"];
            string oldPwd = Request.Form["oldPwd"];
            string newPwd = Request.Form["newPwd"];

            WebServices.Services services = new WebServices.Services();
            if (services.Login(userId, oldPwd))
            {
                if (services.ChangePassword(userId, newPwd))
                {
                    json = "{\"success\": true}";
                }
                else
                {
                    json = "{\"success\": false}";
                }
            }
            else
            {
                json = "{\"success\": false}";
            }


            Response.Write(json);
            Response.End();
        }
        #endregion
    }
Пример #28
0
 protected string QKJE     = ""; //请款金额
 protected void Page_Load(object sender, EventArgs e)
 {
     UserID = CurrentUser.ID;
     WebServices.Services Resource = new WebServices.Services();
     try
     {
         if (Request["RecID"] != null && Request["RecID"].ToString() != "")
         {
             RecID = Request["RecID"].ToString();
             DataTable dt = Resource.GetDataListByResID(ResID, "", " and ID=" + RecID, UserID).Tables[0];
             if (dt != null && dt.Rows.Count > 0)
             {
                 BXDBH    = dt.Rows[0]["报销单编号"].ToString();    //报销单编号
                 RQ       = dt.Rows[0]["日期"].ToString();       //日期
                 BXR      = dt.Rows[0]["报销人"].ToString();      //报销人
                 BXNR     = dt.Rows[0]["报销内容"].ToString();     //报销内容
                 BXSM     = dt.Rows[0]["报销说明"].ToString();     //报销说明
                 BXJE     = dt.Rows[0]["报销金额"].ToString();     //报销金额
                 PZZS     = dt.Rows[0]["凭证张数"].ToString();     //凭证张数
                 BXKMDM   = dt.Rows[0]["报销科目代码"].ToString();   //报销科目代码
                 BXKMMC   = dt.Rows[0]["报销科目名称"].ToString();   //报销科目名称
                 WBXMBH   = dt.Rows[0]["外包项目编号"].ToString();   //外包项目编号
                 BZ       = dt.Rows[0]["备注"].ToString();       //备注
                 SFYHK    = dt.Rows[0]["是否已汇款"].ToString();    //是否已汇款
                 PZSFYDCW = dt.Rows[0]["凭证是否已到财务"].ToString(); //凭证是否已到财务
                 SFYYQK   = dt.Rows[0]["是否已有请款"].ToString();   //是否已有请款
                 QKBH     = dt.Rows[0]["请款编号"].ToString();     //请款编号
                 QKJE     = dt.Rows[0]["请款金额"].ToString();     //请款金额
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #29
0
    /// <summary>
    /// 获取资源ID
    /// </summary>
    /// <param name="KeyWord"></param>
    /// <returns></returns>
    public static string GetResIDByENKekWord(string KeyWord)
    {
        WebServices.Services Resource = new WebServices.Services();
        //string sql = "select [Value] from SysSettings where ENKeyWord='" + KeyWord + "'";
        //DataSet ds = Resource.SelectData(sql);
        UserInfo user = CommonGetInfo.GetUser();
        DataSet  ds   = Resource.GetDataListByResID("437496952875", "", CommonMethod.FilterSql(" and 参数关键字='" + KeyWord + "'"), user.ID);

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                return(ds.Tables[0].Rows[0]["值"].ToString());
            }
            else
            {
                return("");
            }
        }
        else
        {
            return("");
        }
    }
    protected string GetDataDBList()
    {
        string Condition  = "";//Request["Condition"].ToString();
        string KeyWord    = Request["keyWordValue"].ToString();
        int    PageSize   = Convert.ToInt32(Request["rows"]);
        int    PageNumber = Convert.ToInt32(Request["page"]);
        string SortField  = "";
        string SortBy     = "";

        if (Request["Condition"] != null)
        {
            Condition = Request["Condition"].ToString();
        }
        if (Request["SortField"] != null)
        {
            SortField = Request["SortField"].ToString();
        }
        if (Request["SortBy"] != null)
        {
            SortBy = Request["SortBy"].ToString();
        }
        string sqlData = "";

        if (KeyWord == "DBSY")//代办
        {
            sqlData = "select id,FLOWNAME 流程,MAINFIELDVALUE 主题,CREATORNAME 来源,CREATETIME 时间,flowinstid 流程RecID,id 流程ID from VIEW_WF_RECEIVEFILES  WHERE EMPCODE='" + UserID + "'";
        }
        if (KeyWord == "WFQDRW")//我发起的任务
        {
            sqlData  = "SELECT a.flowinstid id,a.flowname 流程,a.mainfieldvalue 主题,b.empname 来源,a.CREATETIME 时间,a.flowinstid 流程RecID, ";
            sqlData += "b.id 流程ID FROM VIEW_WF_START a  left join  WF_USERTASK b  on a.usertaskid=b.id and a.EMPCODE=b.EMPCODE  WHERE a.EMPCODE='" + UserID + "'";
        }
        if (KeyWord == "WCLDRW")//我处理的任务
        {
            sqlData  = "SELECT a.ID,a.flowname 流程,a.mainfieldvalue 主题,b.empname 来源,a.CREATETIME 时间,a.flowinstid 流程RecID,b.id 流程ID ";
            sqlData += "FROM VIEW_WF_ASSOCIATE   a  left join WF_USERTASK b  on a.taskid=b.taskid and a.EMPCODE=b.EMPCODE  WHERE a.EMPCODE='" + UserID + "' ";
        }

        string sql     = "select * from (" + sqlData + ") as c  where 1=1 " + Condition;
        string OrderBy = "";//order  by

        if (SortField != "" && SortBy != "")
        {
            OrderBy = " " + SortField + " " + SortBy;
        }
        if (OrderBy == "")
        {
            OrderBy = " id desc ";
        }
        WebServices.Services services = new WebServices.Services();
        DataTable            dt       = GetDataListPage(sql, PageNumber, PageSize, OrderBy).Tables[0];//'services.SelectData(sql).Tables[0];

        Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
        // //这里使用自定义日期格式,如果不使用的话,默认是ISO8601格式
        timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd";
        string[] changePassWord = Common.getChangePassWord();
        string   dtCount        = services.SelectData(sql, changePassWord[0], changePassWord[1], changePassWord[2]).Tables[0].Rows.Count.ToString();
        string   str            = Newtonsoft.Json.JsonConvert.SerializeObject(dt, timeConverter);

        return("{\"total\":" + dtCount + ",\"rows\":" + str + "}");
    }