예제 #1
0
        protected void btnadd_Click(object sender, EventArgs e)
        {
            SysLogBll.Create("鉴证书打印再次申请", "鉴证书打印再次申请", adminUser.AdminName);
            NCPEP.Bll.T_Dysq   bll   = new NCPEP.Bll.T_Dysq();
            NCPEP.Model.T_Dysq model = new NCPEP.Model.T_Dysq();
            DataTable          dt    = bll.GetList(" fid='" + Request.QueryString["p"] + "'").Tables[0];

            model.fid    = Request.QueryString["p"];
            model.dysqnr = this.txtbeizhu.Value.Trim();
            model.dysqsj = DateTime.Now.ToString();
            model.dyzt   = "1";
            model.dycs   = Convert.ToString(dt.Rows.Count + 1);
            //int id = (int)dal.Create(GetModels(context));
            int id = bll.Add(model);

            if (id > 0)
            {
                NCPEP.Bll.T_Dyzt blldyzt = new NCPEP.Bll.T_Dyzt();
                blldyzt.UpdateByBinid(Request.QueryString["p"], "2");

                MessageBox.Show(this, "申请成功!");
                this.btnadd.Visible = false;
            }
            else
            {
                MessageBox.Show(this, "更新失败!");
            }
        }
예제 #2
0
 private string Sqs(HttpContext context)
 {
     try {
         SysLogBll.Create("产权交易鉴证书再次申请", "产权交易鉴证书再次申请", adminUser.AdminName);
         string           binid   = context.Request["pid"].ToString();
         DataTable        dt      = new DataTable();
         NCPEP.Bll.T_Dyzt blldyzt = new T_Dyzt();
         dt = blldyzt.GetList(" binid='" + binid + "'").Tables[0];
         if (dt.Rows.Count > 0)
         {
             string strdyzt = dt.Rows[0]["dyzt"].ToString();
             if (strdyzt != "1" && strdyzt != "4")
             {
                 return("2");
             }
             //打印申请
             NCPEP.Bll.T_Dysq blldysq = new T_Dysq();
             DataTable        dtdysq  = blldysq.GetList("fid='" + binid + "' order by id desc").Tables[0];
             if (dtdysq.Rows.Count > 0)
             {
                 int dysqcs = int.Parse(dtdysq.Rows[0]["dycs"].ToString());
                 int dyzcs  = dysqcs * 3;
                 NCPEP.Bll.T_Dyjl blldyjl = new T_Dyjl();
                 DataTable        dtdyjl  = blldyjl.GetList("fid='" + binid + "'").Tables[0];
                 if (dtdyjl.Rows.Count >= dyzcs)
                 {
                     return("OK");
                 }
                 else
                 {
                     return("1");
                 }
             }
             else
             {
                 return("1");
             }
         }
         else
         {
             return("1");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return("添加失败请重新操作,错误代码:500 ");
     }
 }
예제 #3
0
 private string GetIdBysqs(HttpContext context)
 {
     try
     {
         int Id = 0;
         try { Id = int.Parse(context.Request.QueryString["Id"]); }
         catch { }
         NCPEP.Bll.T_Dysq bllsq = new T_Dysq();
         DataTable        dt    = bllsq.GetList(" fid='" + Id + "' order by id desc").Tables[0];
         return(dt.Rows[0]["dysqnr"].ToString());
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(null);
     }
 }
예제 #4
0
 private string Create(HttpContext context)
 {
     try
     {
         SysLogBll.Create("产权交易鉴证书打印理由", "添加产权交易鉴证书打印理由操作", adminUser.AdminName);
         if (dal.Create(GetModels(context)))
         {
             string           binid   = context.Request.QueryString["id"];
             DataTable        dt      = new DataTable();
             NCPEP.Bll.T_Dyzt blldyzt = new T_Dyzt();
             dt = blldyzt.GetList(" binid='" + binid + "'").Tables[0];
             if (dt.Rows.Count > 0)
             {
                 try
                 {
                     string dyzt = dt.Rows[0]["dyzt"].ToString();
                     if (dyzt != "1" && dyzt != "4")
                     {
                         return("2");
                     }
                 }
                 catch { }
             }
             else
             {
                 NCPEP.Model.T_Dyzt modeldyzt = new Model.T_Dyzt();
                 modeldyzt.binid = binid;
                 modeldyzt.dyzt  = "1";
                 blldyzt.Add(modeldyzt);
             }
             //打印申请
             NCPEP.Bll.T_Dysq blldysq = new T_Dysq();
             DataTable        dtdysq  = blldysq.GetList("fid='" + binid + "' order by id desc").Tables[0];
             if (dtdysq.Rows.Count > 0)
             {
                 int dysqcs = int.Parse(dtdysq.Rows[0]["dycs"].ToString());
                 int dyzcs  = dysqcs * 3;
                 NCPEP.Bll.T_Dyjl blldyjl = new T_Dyjl();
                 DataTable        dtdyjl  = blldyjl.GetList("fid='" + binid + "'").Tables[0];
                 if (dtdyjl.Rows.Count >= dyzcs)
                 {
                     return("1");
                 }
                 else
                 {
                     NCPEP.Model.T_Dyjl modeldyjl = new Model.T_Dyjl();
                     modeldyjl.dyr    = adminUser.AdminName;
                     modeldyjl.dysj   = DateTime.Now.ToString();
                     modeldyjl.dysqid = "1";//暂时不用
                     modeldyjl.fid    = binid;
                     blldyjl.Add(modeldyjl);
                 }
             }
             else
             {
                 NCPEP.Model.T_Dysq modeldysq = new Model.T_Dysq();
                 modeldysq.dycs   = "1";
                 modeldysq.dysqnr = "第一次打印";
                 modeldysq.dysqsj = DateTime.Now.ToString("yyyy-MM-dd");
                 modeldysq.dyzt   = "1";
                 modeldysq.fid    = binid;
                 blldysq.Add(modeldysq);
             }
             return("OK");
         }
         else
         {
             return("添加失败请重新操作! ");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return("添加失败请重新操作,错误代码:500 ");
     }
 }