Example #1
0
        private string ProContentAdd(HttpContext context)
        {
            string type        = context.Request.Params["type"] == null?"":context.Request.Params["type"].Trim();
            string sid         = context.Request.Params["pc_sid"] == null ? "" : context.Request.Params["pc_sid"].Trim();
            string content     = context.Request.Params["pw_name"] == null ? "" : context.Request.Params["pw_name"].Trim();
            string categorySid = context.Request.Params["pw_sid"] == null ? "" : context.Request.Params["pw_sid"].Trim();
            string pgroup      = context.Request.Params["pgroup"] == null ? "" : context.Request.Params["pgroup"].Trim();
            string remark      = context.Request.Params["pc_remark"] == null ? "" : context.Request.Params["pc_remark"].Trim();
            string pssid       = context.Request.Params["c_pssid"] == null ? "" : context.Request.Params["c_pssid"].Trim();
            string sequence    = context.Request.Params["forwardContent"] == null ? "" : context.Request.Params["forwardContent"].Trim();

            //string content = context.Request.Params["pw_name"].Trim();
            //string pgroup = context.Request.Params["pgroup"].Trim();
            //string remark = context.Request.Params["pc_remark"].Trim();
            //string pssid = context.Request.Params["c_pssid"].Trim();
            //string sequence = context.Request.Params["forwardContent"].Trim();
            Model.project_specific_item model = new Model.project_specific_item();
            model.name       = content;
            model.group_sid  = pgroup;
            model.remark     = remark;
            model.s_sid      = pssid;
            model.isChild    = 0;
            model.parent_sid = 0;
            model.sequence   = int.Parse(sequence);

            //return new DAL.project_specific_item().insert(model,"Insert1","");//new BLL.project_specific_item().add(model);
            string revalue = "";

            revalue = new DAL.project_specific_item().insert(model, "Insert2", categorySid);
            return(revalue);
        }
Example #2
0
 //create by zxf
 public string update(int flag, Model.project_specific_item model, List <Model.project_work_implement> insertList)
 {
     try
     {
         if (dal.exists(" where name='" + model.name + "' and parent_sid=" + model.parent_sid + " and sid !=" + model.sid))
         {
             return("<" + model.name + ">已存在");
         }
         else
         {
             if (dal.update(flag, model, insertList))
             {
                 return("success");
             }
             else
             {
                 return("修改失败!");
             }
         }
     }
     catch (Exception exc)
     {
         return(exc.Message);
     }
 }
Example #3
0
 public string updateConstructionItem(Model.project_specific_item model, DataTable impDT, DataTable fwDT)
 {
     try
     {
         if (dal.exists(" where name='" + model.name + "' and parent_sid=" + model.parent_sid + " and sid!=" + model.sid))
         {
             return("<" + model.name + ">已存在");
         }
         else
         {
             if (dal.updateConstructionItem(model, impDT, fwDT))
             {
                 return("success");
             }
             else
             {
                 return("保存失败!");
             }
         }
     }
     catch (Exception exc)
     {
         return(exc.Message);
     }
 }
Example #4
0
 public string updateItem(Model.project_specific_item model, List <Model.project_item_flow> allList_ft, List <Model.project_work_implement> all)
 {
     try
     {
         if (dal.exists(" where name='" + model.name + "' and parent_sid=" + model.parent_sid + " and sid!=" + model.sid))
         {
             return("<" + model.name + ">已存在");
         }
         else
         {
             if (dal.updateItem(model, allList_ft, all))
             {
                 return("success");
             }
             else
             {
                 return("保存失败!");
             }
         }
     }
     catch (Exception exc)
     {
         return(exc.Message);
     }
 }
Example #5
0
        private string ProjectContentCItemAdd(HttpContext context)
        {
            string ssid       = context.Request.Params["ssid"] == null ? "" : context.Request.Params["ssid"].Trim();
            string name       = context.Request.Params["name"] == null ? "" : context.Request.Params["name"].Trim();
            string pw_content = context.Request.Params["pw_content"] == null ? "" : context.Request.Params["pw_content"].Trim();
            string begin_date = context.Request.Params["begin_date"] == null ? "" : context.Request.Params["begin_date"].Trim();
            string end_date   = context.Request.Params["end_date"] == null ? "" : context.Request.Params["end_date"].Trim();
            string pc_remark  = context.Request.Params["pc_remark"] == null ? "" : context.Request.Params["pc_remark"].Trim();
            string v1         = context.Request.Params["v1"] == null ? "" : context.Request.Params["v1"].Trim();
            string v2         = context.Request.Params["v2"] == null ? "" : context.Request.Params["v2"].Trim();
            string sequence   = context.Request.Params["sequence"] == null ? "" : context.Request.Params["sequence"].Trim();
            //string addstr = context.Request.Params["addstr"] == null ? "" : context.Request.Params["addstr"].Trim();
            //string updatestr = context.Request.Params["updatestr"] == null ? "" : context.Request.Params["updatestr"].Trim();
            //string delstr = context.Request.Params["delstr"] == null ? "" : context.Request.Params["delstr"].Trim();
            string allrows    = context.Request.Params["allrows"] == null ? "" : context.Request.Params["allrows"].Trim();
            string allrows_ft = context.Request.Params["allrows"] == null ? "" : context.Request.Params["allrows_ft"].Trim();
            List <Model.project_work_implement> all = new List <Model.project_work_implement>();

            all = JsonSerializerHelper.JSONStringToList <Model.project_work_implement>(allrows);
            List <Model.project_item_flow> all_ft = new List <Model.project_item_flow>();

            all_ft = JsonSerializerHelper.JSONStringToList <Model.project_item_flow>(allrows_ft);
            //List<Model.project_work_flow> insert = new List<Model.project_work_flow>();
            //insert = JsonSerializerHelper.JSONStringToList<Model.project_work_flow>(addstr);
            //List<Model.project_work_flow> update = new List<Model.project_work_flow>();
            //update = JsonSerializerHelper.JSONStringToList<Model.project_work_flow>(updatestr);
            //List<Model.project_work_flow> del = new List<Model.project_work_flow>();
            //del = JsonSerializerHelper.JSONStringToList<Model.project_work_flow>(delstr);
            Model.project_specific_item model = new Model.project_specific_item();
            model.parent_sid = int.Parse(pw_content);
            model.begin_date = DateTime.Parse(begin_date);
            model.end_date   = DateTime.Parse(end_date);
            model.isChild    = 1;
            model.v1         = v1;
            model.v2         = v2;
            model.name       = name;
            model.s_sid      = ssid;
            model.remark     = pc_remark;
            model.sequence   = int.Parse(sequence);

            return(new BLL.project_specific_item().addItem(model, all_ft, all));
        }
Example #6
0
 public string update(Model.project_specific_item model, string actionStr, string categorySid)
 {
     return(dal.update(model, actionStr, categorySid));
 }
Example #7
0
 public string add(Model.project_specific_item model, string actionStr, string categorySid)
 {
     return(dal.insert(model, actionStr, categorySid));
 }