コード例 #1
0
        public string Group_Edit(HttpContext context)
        {
            Model.BaseUser user = ((Model.BaseUser)context.Session["login"]);
            //string allstr = context.Request.Params["allstr"].Trim();
            string addstr    = context.Request.Params["addstr"].Trim();
            string updatestr = context.Request.Params["updatestr"].Trim();
            string delstr    = context.Request.Params["delstr"].Trim();
            List <Model.ProductColor> insert = new List <Model.ProductColor>();

            insert = JsonSerializerHelper.JSONStringToList <Model.ProductColor>(addstr);
            List <Model.ProductColor> update = new List <Model.ProductColor>();

            update = JsonSerializerHelper.JSONStringToList <Model.ProductColor>(updatestr);
            List <Model.ProductColor> del = new List <Model.ProductColor>();

            del = JsonSerializerHelper.JSONStringToList <Model.ProductColor>(delstr);

            //List<Model.ProductColor> sequence = new List<Model.ProductColor>();
            //sequence = JsonSerializerHelper.JSONStringToList<Model.ProductColor>(allstr);
            string result = new BLL.ProductColor().EditColor(insert, update, del, Convert.ToInt32(((Model.BaseUser)(context.Session["login"])).UserID.ToString()));

            if (result == "success")
            {
            }
            return(result);
        }
コード例 #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null)
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string action = context.Request["action"].ToString();
            string msg    = string.Empty;

            switch (action)
            {
            case "list": msg = GetList(context); break;

            case "group_edit": msg = Group_Edit(context); break;

            case "upload":  Upload(context); break;

            case "GetColor": msg = GetColor(context); break;

            default: break;
            }
            context.Response.Write(msg);
        }
コード例 #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null)
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string type    = context.Request["action"];
            string reValue = "";

            switch (type)
            {
            case "AllTemplateType":
                reValue = AllTemplateType(context);
                break;

            case "TemplateEdit":
                reValue = TemplateEdit(context);
                break;

            default:
                break;
            }
            context.Response.Write(reValue);
        }
コード例 #4
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null && context.Request["action"] != "list")
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string reValue = string.Empty;

            switch (context.Request["action"])
            {
            case "list":
                reValue = QueryList(context);
                break;

            case "add":
                reValue = Add(context);
                break;

            case "edit":
                reValue = Update(context);
                break;

            case "dels":
                reValue = Dels(context);
                break;

            default: break;
            }
            context.Response.Write(reValue);
        }
コード例 #5
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null)
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string reValue = string.Empty;
            string type    = context.Request["action"];

            switch (type)
            {
            case "list": reValue = QueryList(context); break;

            case "stagelist": reValue = QueryStageList(context); break;

            case "stage_list": reValue = QueryStage_List(context); break;

            case "stage_edit": reValue = Stage_Edit(context); break;

            case "delete": reValue = Stage_Delete(context); break;

            case "delete1": reValue = Stage_Delete1(context); break;

            default: break;
            }
            context.Response.Write(reValue);
        }
コード例 #6
0
ファイル: ProjectView.ashx.cs プロジェクト: 15989655205/ljj
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null)
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string type    = context.Request["action"];
            string reValue = "";

            switch (type)
            {
            case "view_user_project":
                reValue = ViewUserProject(context);
                break;

            case "getProject":
                reValue = GetProject(context);
                break;

            case "projectStat":
                reValue = ProjectStat(context);
                break;

            default: break;
            }
            context.Response.Write(reValue);
        }
コード例 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Model.BaseUser bu    = Session["login"] as Model.BaseUser;
         string         table =
             " project a  " +
             " join project_stage b on a.sid=b.p_sid " +
             " join project_group c on b.sid=c.ps_sid " +
             " join project_specific_item d on c.sid=d.group_sid and d.parent_sid=0  " +
             " join project_specific_item e on d.sid=e.parent_sid and e.sid=" + Request.QueryString["si_sid"] + " " +
             " join project_work_implement g on e.sid=g.psi_sid and ','+g.implementer_sid+',' like '%," + bu.UserName + ",%' ";
         string show =
             " a.sid project_id, project_name, project_code, " +
             " b.sid stage_id, stage_name, " +
             " c.sid group_id, group_name, " +
             " d.sid jobduties_id, d.name jobduties_name, " +
             " e.sid detail_id, e.name detail_name, convert(nvarchar,e.begin_date,120)begin_date, convert(nvarchar,e.end_date,120)end_date, " +
             "     dbo.getImplementer_name(e.sid)names, dbo.getImplement(e.sid)implement_name ";
         string where = " 1=1 ";
         int total = 0;
         dt = DbHelperSQL.GetList_ProcPage(table, "project_code", show, 1, 1, out total, "asc", where).Tables[0];
         dt.Rows.Add(dt.NewRow());
     }
 }
コード例 #8
0
        private string Stage_Edit(HttpContext context)
        {
            Model.BaseUser        bu  = (Model.BaseUser)context.Session["login"];
            WCDataProvider        db  = new WCDataProvider();
            WCDataStoreProcedures dsp = new WCDataStoreProcedures("ProjectTemplateType", WCDataAction.Insert1);

            dsp.InputPars.Add("@Sql", " " + context.Request["SQLString"].Substring(0, context.Request["SQLString"].Length - 1));
            dsp.InputPars.Add("@UserName", bu.UserName);
            dsp.InputPars.Add("@ptt_sid", context.Request["ptt_sid"]);
            dsp.InputPars.Add("@ptt_name", context.Request["ptt_name"]);
            dsp.InputPars.Add("@pptt_sid", context.Request["pptt_sid"]);
            if (db.Execute(dsp).ExecuteState)
            {
                if (!string.IsNullOrWhiteSpace(dsp.OutputPars["@error"].ToString()))
                {
                    return(dsp.OutputPars["@error"].ToString());
                }
                else
                {
                    return("success~" + dsp.OutputPars["@outputStr"].ToString());
                }
            }
            else
            {
                return("保存失败。");
            }
        }
コード例 #9
0
 /// <summary>
 /// 页面加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Model.BaseUser        bu  = (Model.BaseUser)Session["login"];
         WCDataProvider        db  = new WCDataProvider();
         WCDataStoreProcedures dsp = new WCDataStoreProcedures("Sp_Disktop", WCDataAction.Query1);
         dsp.InputPars.Add("@end_date", DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"));
         dsp.InputPars.Add("@begin_date", DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"));
         dsp.InputPars.Add("@username", bu.UserName);
         dsp.InputPars.Add("@ApprRole", bu.ApprRole);
         dsp.InputPars.Add("@DeptID", bu.DeptID);
         if (db.Execute(dsp).ExecuteState)
         {
             projectNotice        = GetProjectNotice(dsp.OutputDataSet.Tables[0]);
             projectNonticeCount  = dsp.OutputDataSet.Tables[0].Rows.Count.ToString();
             myProjectPlane       = GetMyProjectPlane(dsp.OutputDataSet.Tables[1]);
             myProjectPlaneCount  = dsp.OutputDataSet.Tables[1].Rows.Count.ToString();
             projectPlanAppr      = GetProjectPlanAppr(dsp.OutputDataSet.Tables[2]);
             projectPlanApprCount = dsp.OutputDataSet.Tables[2].Rows.Count.ToString();
             apprRequest          = GetApprRequest(dsp.OutputDataSet.Tables[3]);
             apprRequestCount     = dsp.OutputDataSet.Tables[3].Rows.Count.ToString();
         }
     }
 }
コード例 #10
0
ファイル: Project_Space.ashx.cs プロジェクト: 15989655205/ljj
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null)
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string type = context.Request["type"];
            string msg  = string.Empty;

            switch (type)
            {
            case "GetList": msg = GetList(context);
                break;

            case "GetName": msg = GetName(context);
                break;

            case "saveRow": msg = SaveRow(context);
                break;

            default: break;
            }

            context.Response.Write(msg);
        }
コード例 #11
0
ファイル: ProductUnit.ashx.cs プロジェクト: 15989655205/ljj
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null)
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string msg  = "";
            string type = context.Request["action"];

            switch (type)
            {
            case "list": msg = List(context);
                break;

            case "Edit": msg = Edit(context);
                break;

            default: break;
            }

            context.Response.Write(msg);
        }
コード例 #12
0
ファイル: Product.ashx.cs プロジェクト: 15989655205/ljj
        public string Group_Edit(HttpContext context)
        {
            long id = Convert.ToInt64(context.Request["ParentID"].ToString());

            Model.BaseUser user      = ((Model.BaseUser)context.Session["login"]);
            string         allstr    = context.Request.Params["allstr"].Trim();
            string         addstr    = context.Request.Params["addstr"].Trim();
            string         updatestr = context.Request.Params["updatestr"].Trim();
            string         delstr    = context.Request.Params["delstr"].Trim();

            Model.ProductPriceColorShip model = new Model.ProductPriceColorShip();

            List <Model.ProductPriceColorShip> insert = new List <Model.ProductPriceColorShip>();

            insert = JsonSerializerHelper.JSONStringToList <Model.ProductPriceColorShip>(addstr);
            List <Model.ProductPriceColorShip> update = new List <Model.ProductPriceColorShip>();

            update = JsonSerializerHelper.JSONStringToList <Model.ProductPriceColorShip>(updatestr);
            List <Model.v_ProductColorShip> del = new List <Model.v_ProductColorShip>();

            del = JsonSerializerHelper.JSONStringToList <Model.v_ProductColorShip>(delstr);

            List <Model.ProductPriceColorShip> sequence = new List <Model.ProductPriceColorShip>();

            sequence = JsonSerializerHelper.JSONStringToList <Model.ProductPriceColorShip>(allstr);
            return(new BLL.ProductPriceColorShip().Edit(insert, update, del, sequence, Convert.ToInt32(((Model.BaseUser)(context.Session["login"])).UserID.ToString()), id));
        }
コード例 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    sid              = Request.Params["sid"].Trim();
                    rfsid            = Request.Params["rfsid"] == null ? "" : Request.Params["rfsid"].Trim();
                    action           = Request.Params["action"] == null ? "" : Request.Params["action"].Trim();
                    currNode         = Request.Params["currNode"] == null ? "" : Request.Params["currNode"].Trim();
                    type             = Request.Params["type"] == null ? "" : Request.Params["type"].Trim();
                    afModel          = new BLL.application_form().GetModel(int.Parse(sid));
                    this.Label1.Text = Server.HtmlDecode(afModel.af_content);
                    //type1.Value = type;
                    Model.BaseUser bu = (Model.BaseUser)Session["login"];
                    GetNode(sid);

                    string          ntsid   = Request.Params["ntsid"] == null ? "" : Request.Params["ntsid"].Trim();
                    Model.node_type ntModel = new BLL.node_type().GetModel(int.Parse(ntsid));
                    nodeType = ntModel.node_type_name;
                    arrStr   = ntModel.value1.Split('|');
                }
            }
            catch
            {
            }
        }
コード例 #14
0
        public string Add(HttpContext context)
        {
            Model.BaseUser bu        = (Model.BaseUser)context.Session["login"];
            string         fmsid     = context.Request.Params["fmsid"].Trim();
            string         flow_name = context.Request.Params["flow_name"].Trim();
            string         rfsid     = context.Request.Params["rfsid"].Trim();
            string         remark    = context.Request.Params["remark"].Trim();
            string         isval     = context.Request.Params["isval"].Trim();
            string         content   = context.Server.HtmlEncode(context.Request.Params["content1"].Trim());

            Model.application_form model = new Model.application_form();
            model.fm_sid     = fmsid;
            model.af_name    = flow_name;
            model.rf_sid     = int.Parse(rfsid);
            model.remark     = remark;
            model.rfs_sid    = int.Parse(isval);
            model.applicant  = bu.UserName;
            model.af_content = content;
            return(new BLL.application_form().insert(model));
            //Model.request_form model = new Model.request_form();
            // model.form_name = formName;
            // model.rft_sid = int.Parse(formType);
            // model.rf_status = int.Parse(isVal);
            //model.remark = remark;
            //model.content_str = content;
            //return new BLL.request_form().Add(model);
        }
コード例 #15
0
ファイル: kaoqin.ashx.cs プロジェクト: 15989655205/ljj
        private string SMyCheck(HttpContext context)
        {
            string result = "{\"total\":0,\"rows\":[]}";

            if (context.Session["login"] == null)
            {
                System.Web.HttpContext.Current.Response.Write("<script>alert('登录信息安全时限过期,请重新登录!');top.location='../Login.aspx'</script>");
            }
            else
            {
                DataTable      dt      = new DataTable();
                Model.BaseUser buModel = (Model.BaseUser)context.Session["login"];
                int            total   = 0;
                int            page    = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
                int            rows    = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
                string         key     = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
                string         order   = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "asc";
                string         sort    = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "b.UserID";
                string where = " 1=1 and a.UserID=" + buModel.UserID + " and KaoQinRiQi between '" + context.Request["startTime"].ToString().Trim() + " 00:00:00'" + " and '" + context.Request["endTime"].Trim() + " 23:59:59'";;
                string table = "ERPKaoQin as a inner join BaseUser as b on a.UserID=b.UserID";
                string show  = "convert(nvarchar(14),a.KaoQinRiQi,23) as T,(isnull((convert(nvarchar(40),DengJiTime1,20)),'')+case when GuiDingTime1<DengJiTime1 then ' (迟到)' when DengJiTime1 is NULL then '未登记' else ' (正常)' end) as DengJiTime1,(isnull((convert(nvarchar(40),DengJiTime2,20)),'')+case when GuiDingTime2>DengJiTime2 then ' (早退)' when DengJiTime2 is NULL then '未登记'  else ' (正常)' end) as DengJiTime2,(isnull((convert(nvarchar(40),DengJiTime3,20)),'')+case when GuiDingTime3<DengJiTime3 then ' (迟到)' when DengJiTime3 is NULL then '未登记'  else ' (正常)' end) as DengJiTime3,(isnull((convert(nvarchar(40),DengJiTime4,20)),'')+case when GuiDingTime4>DengJiTime4 then ' (早退)' when DengJiTime4 is NULL then '未登记' else ' (正常)' end) as DengJiTime4,b.* ";

                dt     = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where).Tables[0];
                result = DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total);
            }

            return(result);
        }
コード例 #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         pdt = new BLL.request_form_type().GetList("status=1").Tables[0];
         bu  = (Model.BaseUser)Session["login"];
     }
 }
コード例 #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     bu = Session["login"] as Model.BaseUser;
     if (!IsPostBack)
     {
         type = Request.Params["type"] == null ? "" : Request.Params["type"].Trim();
     }
 }
コード例 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    string rfsid = Request.Params["rfsid"].Trim();
                    type          = Request.Params["action"].Trim();
                    hrfsid.Value  = rfsid;
                    haction.Value = type;
                    //type1.Value = type;
                    Model.BaseUser bu = (Model.BaseUser)Session["login"];
                    DataTable      dt = new BLL.flow_master().GetList(" rf_sid=" + rfsid + " and dept_sid like '%," + bu.DeptID + ",%' and post_sid like '%," + bu.ApprRole + ",%'").Tables[0];
                    flow_ddl.DataSource     = dt;
                    flow_ddl.DataValueField = "sid";
                    flow_ddl.DataTextField  = "flow_name";
                    flow_ddl.DataBind();
                    Model.request_form model = new BLL.request_form().GetModel(int.Parse(rfsid));
                    switch (type)
                    {
                    case "add":
                        show.Visible  = false;
                        split.Visible = false;

                        GetFormContent(model == null ? "" : model.content_str);
                        flow_name.Text = DBUtility.DbHelperSQL.GetSingle("select dbo.getDeptName('" + bu.DeptID + "')").ToString().Trim() + " " + bu.Name.Trim() + "<" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ">" + model.form_name.Trim();
                        break;

                    case "copy":
                        show.Visible  = false;
                        split.Visible = false;
                        SetValue();
                        flow_name.Text = DBUtility.DbHelperSQL.GetSingle("select dbo.getDeptName('" + bu.DeptID + "')").ToString().Trim() + " " + bu.Name.Trim() + "<" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ">" + model.form_name.Trim();
                        isVal.Checked  = false;
                        break;

                    case "update":
                        show.Visible  = false;
                        split.Visible = false;
                        SetValue();
                        break;

                    case "view":
                        split.Visible  = false;
                        submit.Visible = false;
                        SetValue();
                        break;

                    default:
                        break;
                    }
                    GetNode();
                }
            }
            catch
            {
            }
        }
コード例 #19
0
        public string EditB(HttpContext context)
        {
            Model.BaseUser bu        = (Model.BaseUser)context.Session["login"];
            string         updatestr = context.Request.Params["updatestr"].Trim();
            List <Model.v_ProjectMaterialB> update = new List <Model.v_ProjectMaterialB>();

            update = JsonSerializerHelper.JSONStringToList <Model.v_ProjectMaterialB>(updatestr);
            return(new DAL.Project_Product_Material_B().BUpdate(update, bu.UserID.ToString()));
        }
コード例 #20
0
        private string MaterialAAduitList(HttpContext context)
        {
            Model.BaseUser bu        = (Model.BaseUser)context.Session["login"];
            string         projectID = context.Request.Params["projectID"] == null ? "" : context.Request.Params["projectID"].Trim();
            string         spaceID   = context.Request.Params["spaceID"] == null ? "" : context.Request.Params["spaceID"].Trim();
            string         placeID   = context.Request.Params["placeID"] == null ? "" : context.Request.Params["placeID"].Trim();
            string         wherestr  = context.Request.Params["where"] == null ? "" : context.Request.Params["where"].Trim();
            string         me        = context.Request.Params["me"] == null ? "" : context.Request.Params["me"].Trim();
            int            total     = 0;
            string         table     = "v_ProjectMaterialA";
            string         show      = "*";
            int            page      = context.Request.Form["page"] != "" ? Convert.ToInt32(context.Request.Form["page"]) : 0;
            int            rows      = context.Request.Form["rows"] != "" ? Convert.ToInt32(context.Request.Form["rows"]) : 0;
            string         key       = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";
            //string order = context.Request.Form["order"] != "" ? context.Request.Form["order"] : "desc";
            //string sort = context.Request.Form["sort"] != "" ? context.Request.Form["sort"] : "sid";
            string order = "projectName,[space],place,locationID";
            string sort  = "";

            string where = " 1=1 ";
            if (!string.IsNullOrEmpty(projectID) && projectID != "0")
            {
                where += " and projectID='" + projectID + "'";
            }
            if (!string.IsNullOrEmpty(spaceID) && spaceID != "0")
            {
                where += " and spaceID='" + spaceID + "'";
            }
            if (!string.IsNullOrEmpty(placeID) && placeID != "0")
            {
                where += " and placeID='" + placeID + "'";
            }
            if (!string.IsNullOrEmpty(wherestr))
            {
                where += " and " + wherestr + "";
            }
            if (!string.IsNullOrEmpty(me))
            {
                if (me == "1")
                {
                    where += " and (Auditor='" + bu.UserID + "' or checkPerson='" + bu.UserID + "')";
                }
            }
            DataTable dt = new DataTable();

            DataSet ds = new DataSet();

            //ds = new BLL.Common().GetList("select * from v_ProjectMaterialA " + where);
            ds = new BLL.Common().GetList(table, sort, show, page, rows, out total, order, where);
            if (ds.Tables.Count > 0)
            {
                dt = ds.Tables[0];
            }
            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total));
            //return DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count);
        }
コード例 #21
0
ファイル: MyKaoQinRdlc.aspx.cs プロジェクト: 15989655205/ljj
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         buModel = (Model.BaseUser)Session["login"];
         //STime = Context.Request["STime"].ToString();
         //ETime = Context.Request["ETime"].ToString();
         LoadData();
     }
 }
コード例 #22
0
ファイル: Folder.ashx.cs プロジェクト: 15989655205/ljj
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string save(HttpContext context)
        {
            string    mainPath = ConfigurationManager.AppSettings["FolderPath"];
            string    folder_path;
            string    t             = DateTime.Now.ToString("yyyyMMddhhmmss");
            Random    rnd           = new Random();
            int       i             = rnd.Next(100, 999);
            string    r             = i.ToString();
            DataTable dt            = ParentPath(context.Request["level_ID"].ToString());
            string    checkPathName = CheckPathName(context.Request["level_ID"].ToString(), "", context.Request["folder_name"].ToString());

            if (checkPathName != "")
            {
                return(checkPathName);
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    folder_path = dt.Rows[0]["folder_path"].ToString() + "/" + context.Request["folder_name"].ToString();
                }
                else
                {
                    folder_path = "/" + context.Request["folder_name"].ToString();
                }
                string                data    = "";
                Model.BaseUser        buModel = (Model.BaseUser)context.Session["login"];
                WCDataProvider        db      = new WCDataProvider();
                WCDataStoreProcedures dsp     = new WCDataStoreProcedures("pro_folder", WCDataAction.Insert1);
                dsp.InputPars.Add("@folder_name", context.Request["folder_name"].ToString());
                dsp.InputPars.Add("@folder_level", context.Request["level_ID"].ToString());
                dsp.InputPars.Add("@remark", context.Request["remark"].ToString());
                dsp.InputPars.Add("@up_permission", context.Request["up_user"].ToString());
                dsp.InputPars.Add("@dowm_permission", context.Request["dowm_user"].ToString());
                dsp.InputPars.Add("@folder_path", folder_path);
                dsp.InputPars.Add("@create_person", buModel.Name);
                if (db.Execute(dsp).ExecuteState)
                {
                    data = "success," + dsp.OutputPars["@OutID"].ToString();
                    string createPath = System.Web.HttpContext.Current.Server.MapPath(mainPath + folder_path);
                    if (!Directory.Exists(createPath))
                    {
                        Directory.CreateDirectory(createPath);
                    }
                }
                else
                {
                    if (dsp.OutputPars["Error"].ToString() != "" || string.IsNullOrEmpty(dsp.OutputPars["Error"].ToString()))
                    {
                        data = dsp.OutputPars["Error"].ToString();
                    }
                }
                return(data);
            }
        }
コード例 #23
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Model.BaseUser bu = (Model.BaseUser)context.Session["login"];
            if (bu == null)
            {
                context.Response.Write("登录超时,请重新登录。");
                return;
            }
            string type    = context.Request["action"];
            string reValue = "";

            switch (type)
            {
            case "list":
                reValue = QueryList(context);
                break;

            case "add":
                reValue = Add(context);
                break;

            case "copy":
                reValue = Add(context);
                break;

            case "update":
                reValue = Update(context);
                break;

            case "del":
                reValue = Del(context);
                break;

            case "myApply":
                reValue = RequestFormList(context);
                break;

            case "waitMeAppr":
                reValue = WaitMeApprList(context);
                break;

            case "handle":
                reValue = Handle(context);
                break;

            case "myAppr":
                reValue = MyApprList(context);
                break;

            default: break;
            }
            context.Response.Write(reValue);
        }
コード例 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                rfsid = Request.QueryString["rfsid"].Trim();
                url   = Request.QueryString["url"].Trim();
                Model.BaseUser bu = (Model.BaseUser)Session["login"];

                dt = new BLL.flow_master().GetList(" rf_sid=" + rfsid + " and dept_sid like '%," + bu.DeptID + ",%' and post_sid like '%," + bu.ApprRole + ",%'").Tables[0];
            }
        }
コード例 #25
0
 /// <summary>
 /// 登陆角色信息
 /// </summary>
 /// <param name="page"></param>
 /// <returns></returns>
 public static string GetRoles(MasterPage page)
 {
     Model.BaseUser li = GetLoginInfo(page);
     if (li != null)
     {
         return(li.Roles);
     }
     else
     {
         return("");
     }
 }
コード例 #26
0
ファイル: UserPassword.ascx.cs プロジェクト: 15989655205/ljj
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["login"] != null)
     {
         Model.BaseUser baseUser = (Model.BaseUser)Session["login"];
         userName = baseUser.UserName;
         userID   = baseUser.UserID.ToString();
     }
     else
     {
         System.Web.HttpContext.Current.Response.Write("<script>alert('登录信息安全时限过期,请重新登录!');top.location='../Login.aspx'</script>");
     }
 }
コード例 #27
0
ファイル: UserList.ashx.cs プロジェクト: 15989655205/ljj
        private string Edit(HttpContext context)
        {
            Model.BaseUser buModel = new Model.BaseUser();
            try { buModel.Permissions = int.Parse(context.Request.Form["cbPermissions"]); }
            catch { buModel.Permissions = 0; }
            buModel.UserID   = long.Parse(context.Request.Form["hdUserID"]);
            buModel.UserName = context.Request.Form["txtUserName"].Replace("'", "''").Trim();
            buModel.Pwd      = string.IsNullOrWhiteSpace(context.Request.Form["hdPwd"]) ? DBUtility.WcSecurity.Des.Encrypt(buModel.UserName) : context.Request.Form["hdPwd"];
            buModel.Roles    = context.Request.Form["txtRoles"].Trim();
            int flag = new BLL.BaseUser().Update(buModel);

            return(flag > 0 ? "ok" : flag == 0 ? "保存失败。" : "【登录账号】“" + buModel.UserName + "”已存在。");
        }
コード例 #28
0
ファイル: Folder.ashx.cs プロジェクト: 15989655205/ljj
        public string updata(HttpContext context)
        {
            string mainPath      = ConfigurationManager.AppSettings["FolderPath"];
            string checkPathName = CheckPathName("", context.Request["level_ID"].ToString(), context.Request["folder_name"].ToString());

            Model.BaseUser        buModel = (Model.BaseUser)context.Session["login"];
            string                data    = "";
            WCDataProvider        db      = new WCDataProvider();
            WCDataStoreProcedures dsp     = new WCDataStoreProcedures("pro_folder", WCDataAction.Update2);

            //data = CheckData(context.Request["level_ID"].ToString(), context.Request["up_user"].ToString(), context.Request["dowm_user"].ToString());
            if (checkPathName != "")
            {
                return(checkPathName);
            }
            else
            {
                if (data == "" || string.IsNullOrEmpty(data))
                {
                    dsp.InputPars.Add("@folder_name", context.Request["folder_name"].ToString());
                    dsp.InputPars.Add("@folder_id", context.Request["folder_id"].ToString());
                    dsp.InputPars.Add("@folder_level", context.Request["level_ID"].ToString());
                    dsp.InputPars.Add("@remark", context.Request["remark"].ToString());
                    dsp.InputPars.Add("@up_permission", context.Request["up_user"].ToString());
                    dsp.InputPars.Add("@dowm_permission", context.Request["dowm_user"].ToString());
                    dsp.InputPars.Add("@update_person", buModel.Name);
                    dsp.InputPars.Add("@ups_add", context.Request["ups_add"].ToString());
                    dsp.InputPars.Add("@ups_del", context.Request["ups_del"].ToString());
                    dsp.InputPars.Add("@downs_add", context.Request["downs_add"].ToString());
                    dsp.InputPars.Add("@downs_del", context.Request["downs_del"].ToString());
                    if (db.Execute(dsp).ExecuteState)
                    {
                        string oldPath = System.Web.HttpContext.Current.Server.MapPath(mainPath + dsp.OutputPars["@OutSql"].ToString());
                        string newPath = System.Web.HttpContext.Current.Server.MapPath(mainPath + dsp.OutputPars["@OutSql2"].ToString());
                        if (oldPath != newPath)
                        {
                            if (Directory.Exists(oldPath))
                            {
                                Directory.Move(oldPath, newPath);
                            }
                        }
                        data = "success";
                    }
                    else
                    {
                        data = "修改失败!";
                    }
                }
                return(data);
            }
        }
コード例 #29
0
        public string Handle(HttpContext context)
        {
            Model.BaseUser bu        = (Model.BaseUser)context.Session["login"];
            string         afsid     = context.Request.Params["afsid"].Trim();
            string         node      = context.Request.Params["node"].Trim();
            string         dept      = bu.DeptID.ToString().Trim();
            string         role      = bu.ApprRole.Trim();
            string         approver  = bu.UserName.Trim();
            string         result    = context.Request.Params["result"].Trim();
            string         resultStr = context.Request.Params["resultStr"].Trim();
            string         remark    = context.Request.Params["remark"].Trim();

            return(new BLL.application_form().handle(afsid, node, dept, role, approver, result, resultStr, remark));
        }
コード例 #30
0
ファイル: ProjectAppr.ashx.cs プロジェクト: 15989655205/ljj
        private string QueryList(HttpContext context)
        {
            string type = context.Request.Params["type"] == null ? "" : context.Request.Params["type"].Trim();

            Model.BaseUser bu    = context.Session["login"] as Model.BaseUser;
            string         table = " v_project_review ";
            string         sort  = context.Request.Form["sort"] != null ? context.Request.Form["sort"] : "project_code,project_name, orderby ";
            string         show  = " * ";
            int            page  = context.Request.Form["page"] != null?Convert.ToInt32(context.Request.Form["page"]) : 0;

            int rows = context.Request.Form["rows"] != null?Convert.ToInt32(context.Request.Form["rows"]) : 0;

            int    total = 0;
            string order = context.Request.Form["order"] != null ? context.Request.Form["order"] : "asc";
            string key   = context.Request.Form["key"] != null ? context.Request.Form["key"].Trim() : "";

            //string where = " ','+vname+',' like '%," + bu.UserName + ",%' ";
            string where = " (v1 ='" + bu.UserName + "' or v2 ='" + bu.UserName + "') ";
            if (!string.IsNullOrEmpty(key))
            {
                key    = key.Replace("'", "''");
                where +=
                    " and(project_code like '%" + key + "%' " +
                    "     or project_name like '%" + key + "%' " +
                    "     or stage_name like '%" + key + "%' " +
                    "     or group_name like '%" + key + "%' " +
                    "     or jobduties_name like '%" + key + "%' " +
                    "     or detail_name like '%" + key + "%' " +
                    "     or begin_date like '%" + key + "%' " +
                    "     or end_date like '%" + key + "%' " +
                    "     or names like '%" + key + "%' " +
                    "     or recently_approver like '%" + key + "%' " +
                    "     or recently_date like '%" + key + "%' " +
                    "     or sumbit_user like '%" + key + "%' " +
                    "     or sumbit_date like '%" + key + "%' " +
                    " )  ";
            }
            switch (type)
            {
            case "0":
                where += " and ((review_results=-1 and review_status=0 and type='1' and v1='" + bu.UserName + "') or (review_results=1 and review_status=0 and v2='" + bu.UserName + "'))";
                break;

            default:
                break;
            }
            DataTable dt = DbHelperSQL.GetList_ProcPage(table, sort, show, page, rows, out total, order, where).Tables[0];

            return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, total));
        }