Esempio n. 1
0
 private void DataDelete(string strPK, string bh, string name, string company, string branch)
 {
     try
     {
         if (PublicDal.IsDelete(this.Page, "TB_QUOTA", "PD_QUOTA_CODE", strPK, "PD_QUOTA_SERVERPK"))
         {
             TB_QUOTA_Bll bll = new TB_QUOTA_Bll();
             TB_QUOTA_DETAIL tb_quota_detail = new TB_QUOTA_DETAIL();
             if (bll.Delete(strPK))
             {
                 tb_quota_detail.DeleteProject(strPK);
                 PageShowText.ShowMessage("删除成功!", this.Page);
             }
             else
             {
                 PageShowText.ShowMessage("删除失败!", this.Page);
             }
             if (this.Master.PageIndex > 1)
             {
                 this.pageind = this.Master.PageIndex;
             }
             this.ShowData(this.Master.StrSelect);
         }
         else
         {
             PageShowText.ShowMessage("单据已进入业务流程,需删除请追回单据后再进行删除。", this.Page);
         }
     }
     catch (Exception exception)
     {
         this.el = new ExceptionLog.ExceptionLog();
         this.el.ErrClassName = base.GetType().ToString();
         this.el.ErrMessage = exception.Message.ToString();
         this.el.ErrMethod = "DataDelete()";
         this.el.WriteExceptionLog(true);
         Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page);
     }
 }
Esempio n. 2
0
 private void CreateData()
 {
     string strErr = "";
     if (!this.PanDuan(ref strErr))
     {
         this.hy_File(null, strErr);
     }
     else
     {
         TB_QUOTA_Model model = this.GetModel(null);
         model.PD_QUOTA_CODE = DateTime.Now.ToString("yyyyMMddhhmmssffffff");
         TB_QUOTA_Bll bll = new TB_QUOTA_Bll();
         if ((base.Request["CreatePK"] != null) && (base.Request["CreatePK"].Trim() != ""))
         {
             model.PD_QUOTA_PICI = bll.GetMaxPiCi(model.PD_QUOTA_ZBWH).ToString();
         }
         UserModel model2 = (UserModel)this.Session["User"];
         model.PD_QUOTA_SERVERPK = PublicDal.SetCreateServiceStream(this.Page);
         model.PD_QUOTA_INPUT_COMPANY = this.Session["pk_corp"].ToString();
         model.PD_QUOTA_INPUT_MAN = model2.UserName;
         model.PD_QUOTA_INPUT_DEPART = model2.Branch.BH;
         model.PD_QUOTA_INPUT_DATE = new DateTime?(DateTime.Now);
         string wh = ((UserModel)this.Session["user"]).Company.Name.Substring(0, 1) + ((UserModel)this.Session["user"]).Branch.Name.Substring(0, 1);
         this.GetQUOTA(model);
         bll.Add(model, wh);
         string str3 = model.PD_QUOTA_CODE;
         SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
         List<SMZJ.Model.TB_QUOTA_DETAIL> qUOTAModel = this.GetQUOTAModel(model.PD_QUOTA_CODE);
         tb_quota_detail.DeleteProject(str3);
         tb_quota_detail.AddList(qUOTAModel);
         this.UpdateLog(str3, "新建指标", "执行 新建 成功", "", str3, "", "");
         Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model.PD_QUOTA_CODE, this.Page);
     }
 }
Esempio n. 3
0
 private bool ShowBZ_MxButton(out ButtonsModel model)
 {
     string str = base.Request["UpdatePK"];
     string str2 = ((UserModel)HttpContext.Current.Session["User"]).Company.pk_corp;
     ((UserModel)HttpContext.Current.Session["User"]).Branch.BH.Trim();
     bool isQianShou = false;
     model = new ButtonsModel();
     if (str != null)
     {
         TB_QUOTA_Model isUpModel = new TB_QUOTA_Bll().GetIsUpModel(str);
         if (isUpModel.PD_QUOTA_ISUP == "1")
         {
             SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
             SMZJ.Model.TB_QUOTA_DETAIL tb_quota_detail2 = tb_quota_detail.GetSonServerPK_Model(str2, str);
             if (tb_quota_detail2 != null)
             {
                 this.buttonTxt.Value = PublicDal.ShowBZ_MxButton_IsUP(this.Page, out model, tb_quota_detail2.PD_QUOTA_SERVERPK, isQianShou);
                 model.IfSave = false;
                 model.IfSetBack = false;
                 model.IfRollBack = false;
                 return isQianShou;
             }
             isQianShou = !tb_quota_detail.GetShiDFouJS_Model(str, 1);
             this.buttonTxt.Value = PublicDal.ShowBZ_MxButton_IsUP(this.Page, out model, isUpModel.PD_QUOTA_SERVERPK, isQianShou);
             if (!PublicDal.IsJGBM(((UserModel)this.Session["User"]).Branch.BH.Trim()))
             {
                 model.IfSave = false;
             }
             if (model.IfSave)
             {
             }
             return isQianShou;
         }
         this.buttonTxt.Value = PublicDal.ShowMxButton(this.Page, out model, "TB_QUOTA", "PD_QUOTA_CODE", str, "PD_QUOTA_SERVERPK");
         return isQianShou;
     }
     this.buttonTxt.Value = PublicDal.ShowMxButton(this.Page, out model, "TB_QUOTA", "PD_QUOTA_CODE", null, "PD_QUOTA_SERVERPK");
     return isQianShou;
 }
Esempio n. 4
0
 public void SetBZ_ServiceStream(int operation, string PD_PROJECT_CODE, string Mess)
 {
     int num = 0;
     UserModel model = (UserModel)HttpContext.Current.Session["User"];
     model.Branch.BH.Trim();
     string str = model.Company.pk_corp;
     try
     {
         TB_QUOTA_Bll bll = new TB_QUOTA_Bll();
         TB_QUOTA_Model isUpModel = bll.GetIsUpModel(PD_PROJECT_CODE);
         SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
         if (operation == 0)
         {
             if (isUpModel.PD_QUOTA_ISUP == "1")
             {
                 if (!tb_quota_detail.GetShiDFouJS_Model(PD_PROJECT_CODE, 1))
                 {
                     PageShowText.Refurbish("已有乡镇已签收,无法进行此操作!", this.Page);
                     num = 0;
                     return;
                 }
                 num = bll.UpdateIsXiaFa(PD_PROJECT_CODE, "0", "0", "0");
                 tb_quota_detail.UpdateSonServerPK(PD_PROJECT_CODE, "", "0", "0", "", "");
             }
             this.SetServiceStream(operation, PD_PROJECT_CODE, Mess);
             num = 1;
         }
         else if (isUpModel.PD_QUOTA_ISUP == "1")
         {
             SMZJ.Model.TB_QUOTA_DETAIL tb_quota_detail2 = tb_quota_detail.GetSonServerPK_Model(str, PD_PROJECT_CODE);
             string newServerPK = "";
             if (tb_quota_detail2 != null)
             {
                 PublicDal.GetUpDownStream(this.Page, tb_quota_detail2.PD_QUOTA_SERVERPK, 2, out newServerPK);
                 string iSRECEIVE = "";
                 string iSHUIZHI = "";
                 string rECEIVEMAN = "";
                 string hUIZHIMAN = "";
                 iSRECEIVE = "1";
                 iSHUIZHI = "1";
                 rECEIVEMAN = tb_quota_detail2.RECEIVE_MAN;
                 hUIZHIMAN = model.UserName;
                 if ((isUpModel.PD_QUOTA_IFXZHZ != null) && (isUpModel.PD_QUOTA_IFXZHZ.Trim() != "1"))
                 {
                     bll.UpdateIsXiaFa(PD_PROJECT_CODE, "1", "1", "1");
                 }
                 if (tb_quota_detail.UpdateSonServerPK(PD_PROJECT_CODE, str, newServerPK, iSRECEIVE, iSHUIZHI, rECEIVEMAN, hUIZHIMAN))
                 {
                     num = 1;
                     newServerPK = "";
                     PublicDal.GetUpDownStream(this.Page, isUpModel.PD_QUOTA_SERVERPK, 1, out newServerPK);
                     if (tb_quota_detail.IsHuiZhi(PD_PROJECT_CODE) && (newServerPK != isUpModel.PD_QUOTA_SERVERPK))
                     {
                         this.SetServiceStream(1, PD_PROJECT_CODE, null);
                         this.SetServiceStream(1, PD_PROJECT_CODE, null);
                     }
                     PageShowText.Refurbish(Mess + "成功", this.Page);
                 }
                 else
                 {
                     num = 0;
                     PageShowText.Refurbish(Mess + "失败", this.Page);
                 }
             }
             else
             {
                 PageShowText.Refurbish(Mess + "签收失败,没有您需要签收的附件!", this.Page);
             }
         }
         else
         {
             this.SetServiceStream(operation, PD_PROJECT_CODE, Mess);
             num = 1;
         }
     }
     finally
     {
         if (num == 1)
         {
             this.UpdateLog(PD_PROJECT_CODE, Mess, "执行 " + Mess + " 成功", "", PD_PROJECT_CODE, "", "");
         }
         else
         {
             this.UpdateLog(PD_PROJECT_CODE, Mess, "执行 " + Mess + " 失败", "", PD_PROJECT_CODE, "", "");
         }
     }
 }
Esempio n. 5
0
 private void Bind1(string PD_QUOTA_CODE, TB_QUOTA_Model model, bool IsCreate)
 {
     if (PD_QUOTA_CODE == "")
     {
         this.txtPD_QUOTA_ZGBM.Text = "乡镇人民政府";
     }
     SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
     string strWhere = " PD_QUOTA_CODE='" + PD_QUOTA_CODE + "' and IF_SHOW=1 ";
     if (!IsCreate)
     {
         string str2 = ((UserModel)HttpContext.Current.Session["User"]).Company.pk_corp;
         if (str2.Trim() != model.PD_QUOTA_INPUT_COMPANY.Trim())
         {
             strWhere = strWhere + " and COMPANY_CODE like '" + str2 + "%'";
         }
     }
     else
     {
         strWhere = " 1=0 ";
     }
     DataSet list = tb_quota_detail.GetList(strWhere);
     this.json_xzxxData.Value = base.Server.UrlEncode(PublicDal.DataToJSON(list));
     if (list.Tables[0].Rows.Count > 0)
     {
         list.Tables[0].Rows.Clear();
     }
     DataRow row = list.Tables[0].NewRow();
     row["PD_QUOTA_CODE"] = PD_QUOTA_CODE;
     list.Tables[0].Rows.Add(row);
     this.json_xzxx.Value = base.Server.UrlEncode(PublicDal.DataToJSON(list));
     DataSet ds = new DataSet();
     ds.Tables.Add();
     ds.Tables[0].Columns.Add("AUTO_NO");
     ds.Tables[0].Columns.Add("FILE_NAME");
     ds.Tables[0].Columns.Add("FILE_SYSNAME");
     if ((model != null) && this.tr_wjzl.Visible)
     {
         string[] strArray = model.PD_QUOTA_FILE.Split(new char[] { '|' });
         if (strArray.Length > 1)
         {
             DataRow row2 = ds.Tables[0].NewRow();
             row2["AUTO_NO"] = model.AUTO_NO;
             row2["FILE_NAME"] = strArray[1];
             row2["FILE_SYSNAME"] = strArray[0];
             ds.Tables[0].Rows.Add(row2);
         }
     }
     this.json_btData.Value = base.Server.UrlEncode(PublicDal.DataToJSON(ds));
 }
Esempio n. 6
0
 private void UpdateXiaFaOld(int operation, string PD_QUOTA_CODE, string Mess)
 {
     TB_QUOTA_Bll bll = new TB_QUOTA_Bll();
     if (bll.UpdateIsXiaFa(PD_QUOTA_CODE, "1", "0", "0") > 0)
     {
         string str = this.SetServiceStream(operation, PD_QUOTA_CODE, Mess);
         SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
         if (tb_quota_detail.UpdateSonServerPK(PD_QUOTA_CODE, str, "0", "0", "", ""))
         {
             this.UpdateLog(PD_QUOTA_CODE, Mess, "执行 " + Mess + " 成功", "", PD_QUOTA_CODE, "", "");
         }
         else
         {
             this.UpdateLog(PD_QUOTA_CODE, Mess, "执行 " + Mess + " 失败", "", PD_QUOTA_CODE, "", "");
         }
     }
     else
     {
         PageShowText.Refurbish(Mess + "失败", this.Page);
     }
 }
Esempio n. 7
0
 private void UpdataData(string PD_QUOTA_CODE)
 {
     string strErr = "";
     if (!this.PanDuan(ref strErr))
     {
         this.hy_File(null, strErr);
     }
     else
     {
         TB_QUOTA_Bll bll = new TB_QUOTA_Bll();
         TB_QUOTA_Model model = new TB_QUOTA_Model();
         model = bll.GetModel(PD_QUOTA_CODE);
         model = this.GetModel(model);
         model.PD_QUOTA_CODE = PD_QUOTA_CODE;
         this.GetQUOTA(model);
         bll.Update(model);
         SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
         List<SMZJ.Model.TB_QUOTA_DETAIL> qUOTAModel = this.GetQUOTAModel(PD_QUOTA_CODE);
         tb_quota_detail.DeleteProject(PD_QUOTA_CODE);
         tb_quota_detail.AddList(qUOTAModel);
         this.UpdateLog(PD_QUOTA_CODE, "修改指标", "执行 修改 成功", "", PD_QUOTA_CODE, "", "");
         PageShowText.Refurbish("修改成功", this.Page);
     }
 }
 private void CreateData()
 {
     string strErr = "";
     if (!this.PanDuan(ref strErr))
     {
         this.hy_File(null, strErr);
     }
     else
     {
         TB_QUOTA_Model model = this.GetModel();
         new TB_QUOTA_Bll().Add(model, "");
         string str2 = model.PD_QUOTA_CODE;
         SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
         List<SMZJ.Model.TB_QUOTA_DETAIL> qUOTAModel = this.GetQUOTAModel(str2);
         tb_quota_detail.DeleteProject(str2);
         tb_quota_detail.AddList(qUOTAModel);
         PageShowText.Refurbish("添加成功", this.Page);
     }
 }
 private void Bind1(string PD_QUOTA_CODE, TB_QUOTA_Model model)
 {
     DataSet list = new SMZJ.BLL.TB_QUOTA_DETAIL().GetList(" PD_QUOTA_CODE='" + PD_QUOTA_CODE + "'");
     this.json_xzxxData = PublicDal.DataToJSON(list);
     if (list.Tables[0].Rows.Count > 0)
     {
         list.Tables[0].Rows.Clear();
     }
     DataRow row = list.Tables[0].NewRow();
     row["PD_QUOTA_CODE"] = PD_QUOTA_CODE;
     list.Tables[0].Rows.Add(row);
     this.json_xzxx = PublicDal.DataToJSON(list);
     DataSet ds = new DataSet();
     ds.Tables.Add();
     ds.Tables[0].Columns.Add("AUTO_NO");
     ds.Tables[0].Columns.Add("FILE_NAME");
     ds.Tables[0].Columns.Add("FILE_SYSNAME");
     if (model != null)
     {
         string[] strArray = model.PD_QUOTA_FILE.Split(new char[] { '|' });
         if (strArray.Length > 1)
         {
             DataRow row2 = ds.Tables[0].NewRow();
             row2["AUTO_NO"] = model.AUTO_NO;
             row2["FILE_NAME"] = strArray[1];
             row2["FILE_SYSNAME"] = strArray[0];
             ds.Tables[0].Rows.Add(row2);
         }
     }
     this.json_btData = PublicDal.DataToJSON(ds);
 }
Esempio n. 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["User"] != null)
     {
         UserModel model = (UserModel)this.Session["User"];
         string isHasBaby = model.Company.IsHasBaby;
         string isJGBM = model.Branch.IsJGBM;
         VelocityEngine engine = new VelocityEngine();
         ExtendedProperties p = new ExtendedProperties();
         p.AddProperty("file.resource.loader.path", base.Server.MapPath("Templete"));
         p.SetProperty("input.encoding", "utf-8");
         p.SetProperty("output.encoding", "utf-8");
         engine.Init(p);
         Template template = engine.GetTemplate("0.vm", "utf-8");
         DataTable table = null;
         string str3 = "0";
         string str4 = "";
         string sQLString = "";
         string str6 = "";
         if (base.Request.Params["yl"] != null)
         {
             string str7 = base.Server.UrlDecode(base.Request.Params["pk"]).Replace("'", "");
             str6 = DbHelperOra.GetSingle("select t.systemusername from DB_CONFIGURATION t").ToString();
             TB_QUOTA_Model model2 = new TB_QUOTA_Bll().GetModel(base.Request.Params["pk"]);
             if (base.Request.Params["yl"] == "1")
             {
                 sQLString = "select * from v_mes_gs where pd_quota_code in (" + str7 + ")";
                 if (model2.PD_QUOTA_IFPASS != "1")
                 {
                     str4 = "此指标没有传递,不能打印“业务股室告知乡财”告知书";
                 }
                 else
                 {
                     template = engine.GetTemplate("1.vm", "utf-8");
                 }
             }
             else if (base.Request.Params["yl"] == "2")
             {
                 sQLString = "select * from v_mes_gs_2 where pd_quota_code in (" + str7 + ")";
                 string str8 = ((UserModel)this.Session["User"]).Company.pk_corp;
                 if (str8.Trim() != model2.PD_QUOTA_INPUT_COMPANY.Trim())
                 {
                     sQLString = sQLString + " and COMPANY_CODE='" + str8 + "'";
                 }
                 if (model2.PD_QUOTA_ISUP != "1")
                 {
                     str4 = "此指标没有下发,不能打印“乡财告知乡镇”告知书";
                 }
                 else
                 {
                     template = engine.GetTemplate("2.vm", "utf-8");
                 }
             }
             else if (base.Request.Params["yl"] == "3")
             {
                 string name = "3.vm";
                 if (DbHelperOra.Exists("select count(*) from tb_quota where  pd_quota_code in (" + str7 + ") and PD_QUOTA_ZJXZ='01'"))
                 {
                     sQLString = "select * from v_mes_gs_4 where pd_quota_code in (" + str7 + ")";
                     name = "4.vm";
                 }
                 else
                 {
                     sQLString = "select * from v_mes_gs_3 where pd_quota_code in (" + str7 + ")";
                 }
                 SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
                 string strWhere = " PD_QUOTA_CODE='" + base.Request.Params["pk"] + "' and IF_SHOW=1 ";
                 string str11 = ((UserModel)this.Session["User"]).Company.pk_corp;
                 if (str11.Trim() != model2.PD_QUOTA_INPUT_COMPANY.Trim())
                 {
                     strWhere = strWhere + " and COMPANY_CODE='" + str11 + "'";
                     sQLString = sQLString + " and COMPANY_CODE='" + str11 + "'";
                 }
                 DataSet list = tb_quota_detail.GetList(strWhere);
                 if ((list.Tables[0].Rows[0]["ishuizhi"].ToString().Trim() != "是") && (list.Tables[0].Rows[0]["ishuizhi"].ToString().Trim() != "1"))
                 {
                     str4 = "此指标没有回执,不能打印“乡镇回执乡财”告知书";
                 }
                 else
                 {
                     template = engine.GetTemplate(name, "utf-8");
                 }
             }
             else
             {
                 str4 = "内部错误,请重新登录";
             }
             if (str4 == "")
             {
                 table = DbHelperOra.Query(sQLString).Tables[0];
                 str3 = "1";
             }
         }
         VelocityContext context = new VelocityContext();
         context.Put("XiangZhen", str6);
         context.Put("xzs", table);
         context.Put("isnew", str3);
         context.Put("isHasBaby", isHasBaby.Trim());
         context.Put("IsJGBM", isJGBM.Trim());
         context.Put("DataPK", base.Request.Params["pk"]);
         context.Put("PrintTxt", str4);
         context.Put("rc", ((table == null) || (table.Rows.Count == 0)) ? "0" : table.Rows.Count.ToString());
         template.Merge(context, base.Response.Output);
     }
 }