Beispiel #1
0
        protected void btnadd_Click(object sender, EventArgs e)
        {
            SysLogBll.Create("检证书修改", "检证书修改", adminUser.AdminName);
            NCPEP.Bll.T_Jzs   bll   = new NCPEP.Bll.T_Jzs();
            NCPEP.Model.T_Jzs model = new NCPEP.Model.T_Jzs();
            DataTable         dt    = bll.GetList(" binid='" + Request.QueryString["p"] + "'").Tables[0];

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    bll.Delete(int.Parse(dr["id"].ToString()));
                }
            }
            try { model.beizhu = this.txtbeizhu.Value; }
            catch { }
            try { model.binid = Request.QueryString["p"].ToString(); }
            catch { }
            model.cjje    = this.txtcjje.Value;
            model.htbh    = this.txthtbh.Value;
            model.zcdate  = this.txtStartDatejzs.Value;
            model.zcdatez = this.txtEndDatejzs.Value;
            model.beiyong = this.txtbeizhu.Value.Trim();
            //int id = (int)dal.Create(GetModels(context));
            int id = bll.Add(model);

            if (id > 0)
            {
                MessageBox.Show(this, "更新成功!");
            }
            else
            {
                MessageBox.Show(this, "更新失败!");
            }
        }
Beispiel #2
0
 public LineMonitorPresenter(ILineMonitorView view)
 {
     this.view        = view;
     mesDA            = new MesDA();
     logBll           = new SysLogBll();
     produceRecordBll = new ProduceRecordBll();
 }
Beispiel #3
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, "更新失败!");
            }
        }
Beispiel #4
0
 private string Create(HttpContext context)
 {
     try
     {
         SysLogBll.Create("检证书修改", "检证书修改", adminUser.AdminName);
         NCPEP.Bll.T_Jzs   bll   = new NCPEP.Bll.T_Jzs();
         NCPEP.Model.T_Jzs model = new NCPEP.Model.T_Jzs();
         try { model.beizhu = context.Request.Form["beizhu"].ToString(); }
         catch { }
         try { model.binid = context.Request.Form["Id"].ToString(); }
         catch { }
         model.cjje    = context.Request.Form["cjje"].ToString();
         model.htbh    = context.Request.Form["htbh"].ToString();
         model.zcdate  = context.Request.Form["jzsStartDate"].ToString();
         model.zcdatez = context.Request.Form["jzsEndDate"].ToString();
         //int id = (int)dal.Create(GetModels(context));
         int id = bll.Add(model);
         if (id > 0)
         {
             return("添加成功!");
         }
         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 ");
     }
 }
Beispiel #5
0
 public void Page_Load(object sender, EventArgs args)
 {
     if (IsPostBack)
     {
         string name = Request ["name"].TryToString();
         string pwd  = Request ["pwd"].TryToString();
         if (!(string.IsNullOrEmpty(name) || string.IsNullOrEmpty(pwd)))
         {
             if (UserBll.Login(Request ["name"], Request ["pwd"]) == 1)
             {
                 if (Request["returnURL"] != null)
                 {
                     string result = string.Empty;
                     result = SysLogBll.AddSysLog(BonusAction.Login, "");
                     Response.Redirect("../" + System.Web.HttpUtility.UrlDecode(Request["returnURL"].ToString()));
                 }
                 else
                 {
                     string result = string.Empty;
                     result = SysLogBll.AddSysLog(BonusAction.Login, "");
                     Response.Redirect("admin.aspx");
                 }
             }
         }
     }
 }
Beispiel #6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            NCPEP.Bll.T_LiceTran   dal   = new NCPEP.Bll.T_LiceTran();
            NCPEP.Model.T_LiceTran model = new NCPEP.Model.T_LiceTran();

            string username  = this.username.Value.Trim();
            string password  = this.password.Value.Trim();
            string randid    = this.randid.Value;
            string CheckCode = Session["CheckCode"] as string;

            if (randid.ToUpper().Equals(CheckCode.ToUpper()))
            {
                model = dal.GetModeluser(username, password);
                if (model != null)
                {
                    Session.Add("jbyhm", model);

                    SysLogBll.Create("竞标登陆页面", "竞标用户登陆成功", model.JBYhm);
                    Response.Redirect("mainuser.aspx");
                    //AddCookie(context, adminUser.Id.ToString());
                }
                else
                {
                    MessageBox.Show(this, "竞标用户不存在或者密码错误,请重新登陆!");
                    return;
                }
            }
            else
            {
                //SysLogBll.Create("登陆页面", "验证码错误", adminUser.AdminName);
                MessageBox.Show(this, "验证码错误请重新输入!");
                return;
            }
        }
 public LineMonitorPresenter(ILineMonitorView view)
 {
     this.view = view;
     // mesDA = new MesDA();
     logBll                     = new SysLogBll();
     produceRecordBll           = new ProduceRecordBll();
     bllOfflineData             = new OfflineDataBLL();
     this.bllFxjDataUploadToMes = new FXJDatabase.tb_CheckDataonlineBLL();
 }
Beispiel #8
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            NCPEP.Dal.AdminUserDal dal = new AdminUserDal();
            dynamic adminUser          = null;
            string  username           = this.username.Value.Trim();
            string  password           = this.password.Value.Trim();
            string  randid             = this.randid.Value;
            string  CheckCode          = Session["CheckCode"] as string;

            if (randid.ToUpper().Equals(CheckCode.ToUpper()))
            {
                if (dal.CheckUserName(username))
                {
                    adminUser = dal.AdminUserLogin(username, password);
                    if (!string.IsNullOrEmpty(adminUser.AdminLogPass))
                    {
                        if (0 != adminUser.AdminState)
                        {
                            Session.Add("SuperAdminUserSession", adminUser);
                            dal.NumberLogin(adminUser.Id);
                            SysLogBll.Create("登陆页面", "登陆成功", adminUser.AdminName);
                            Response.Redirect("main.aspx");
                            //AddCookie(context, adminUser.Id.ToString());
                        }
                        else
                        {
                            //SysLogBll.Create("登陆页面", "账户禁用", adminUser.AdminName);
                            MessageBox.Show(this, "用于登录后台管理的账户已经被禁用");
                            return;
                        }
                    }
                    else
                    {
                        //SysLogBll.Create("登陆页面", "密码错误", adminUser.AdminName);

                        MessageBox.Show(this, "密码不正确请重新输入密码!");
                        return;
                    }
                }
                else
                {
                    //SysLogBll.Create("登陆页面", "用户名错误", adminUser.AdminName);

                    MessageBox.Show(this, "用户名不存在请联系上级单位!");
                    return;
                }
            }
            else
            {
                //SysLogBll.Create("登陆页面", "验证码错误", adminUser.AdminName);
                MessageBox.Show(this, "验证码错误请重新输入!");
                return;
            }
        }
Beispiel #9
0
        private string Create(HttpContext context)
        {
            try
            {
                SysLogBll.Create("项目备案添加", "项目备案添加", adminUser.AdminName);
                NCPEP.Bll.T_XmBeian   bll   = new NCPEP.Bll.T_XmBeian();
                NCPEP.Model.T_XmBeian model = new NCPEP.Model.T_XmBeian();
                model.beiyong            = "1";//审核状态
                model.beiyongb           = "";
                model.beizhu             = context.Request.Form["beizhu"];
                model.changjiaozongjia   = context.Request.Form["zongjia"];
                model.chengjiaodanjia    = context.Request.Form["danjia"];
                model.churangfang        = context.Request.Form["crf"];
                model.churangfangxingzhi = context.Request.Form["crfxz"];
                model.cqleixing          = context.Request.Form["Properties"];
                model.cqname             = context.Request.Form["BidName"];
                model.cqquanshu          = context.Request.Form["Ownership"];
                model.danwei             = context.Request.Form["gmdw"];
                model.guimo = context.Request.Form["guimo"];
                try
                {
                    model.hetongjsrq = Convert.ToDateTime(DateTime.Parse(context.Request.Form["EndDate"].ToString()).ToString("yyyy年MM月dd日"));
                }
                catch { }
                try
                {
                    model.hetongksrq = Convert.ToDateTime(DateTime.Parse(context.Request.Form["StartDate"].ToString()).ToString("yyyy年MM月dd日"));
                }
                catch { }
                model.jiaoyifangshi       = context.Request.Form["StandardMode"];
                model.shourangfang        = context.Request.Form["srf"];
                model.shourangfangxingzhi = context.Request.Form["srfxz"];
                model.zhifufangshi        = context.Request.Form["zffs"];
                model.orgcode             = context.Request.Form["OrgCode"];

                //int id = (int)dal.Create(GetModels(context));
                int id = bll.Add(model);
                if (id > 0)
                {
                    return("添加成功!");
                }
                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 ");
            }
        }
        public Dictionary <string, object> RoleDel()
        {
            IDatabase     database    = DataFactory.Database();
            DbTransaction isOpenTrans = database.BeginTrans();


            var    context    = (HttpContextBase)Request.Properties["MS_HttpContext"];
            var    request    = context.Request;
            string roleidlist = request.Form["roleidlist"];

            string[]    arrid    = roleidlist.Split(',');
            List <Role> listrole = database.FindList <Role>(" and RoleId in(" + roleidlist + ")");

            try
            {
                StringBuilder sbUserRole = new StringBuilder();
                sbUserRole.Append("delete UserRole where  RoleId in (" + roleidlist + ")");
                database.ExecuteBySql(sbUserRole, isOpenTrans);
                StringBuilder sbModuleRole = new StringBuilder();
                sbModuleRole.Append("delete ModuleRole where  RoleId in (" + roleidlist + ") ");
                database.ExecuteBySql(sbModuleRole, isOpenTrans);
                StringBuilder sbModuleOperateRole = new StringBuilder();
                sbModuleOperateRole.Append("delete ModuleOperateRole where RoleId in (" + roleidlist + ")");
                database.ExecuteBySql(sbModuleOperateRole, isOpenTrans);
                StringBuilder sbRole = new StringBuilder();
                sbRole.Append("delete Role where RoleId in (" + roleidlist + ") ");
                database.ExecuteBySql(sbRole, isOpenTrans);

                SysLogBll sysLogBll = new SysLogBll();
                database.Commit();
                sysLogBll.WriteLog <Role>(listrole, (int)Utilities.LogSatus.Success, "角色删除");

                return(new Dictionary <string, object>
                {
                    { "code", "1" }
                });
            }
            catch (Exception)
            {
                database.Rollback();
                return(new Dictionary <string, object>
                {
                    { "code", "0" }
                });
            }

            //return new Dictionary<string, object>
            //{
            //    { "code","0"}
            //};
        }
Beispiel #11
0
 private NCPEP.Model.T_XmBeian GetById(HttpContext context)
 {
     try
     {
         SysLogBll.Create("项目备案", "项目备案信息修改", adminUser.AdminName);
         int id = 0;
         try { id = int.Parse(context.Request.QueryString["Id"]); }
         catch { }
         NCPEP.Model.T_XmBeian model = new NCPEP.Model.T_XmBeian();
         NCPEP.Bll.T_XmBeian   bll   = new NCPEP.Bll.T_XmBeian();
         model = bll.GetModel(id);
         return(model);
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(null);
     }
 }
        public Dictionary <string, object> UserRoleAdd()
        {
            var           context     = (HttpContextBase)Request.Properties["MS_HttpContext"];
            var           request     = context.Request;
            string        roleid      = request.Form["roleid"];
            string        userid      = request.Form["userid"];
            IDatabase     database    = DataFactory.Database();
            DbTransaction isOpenTrans = database.BeginTrans();

            string[] arruserid = userid.Split(',');
            try
            {
                StringBuilder sbUserRole = new StringBuilder("delete  UserRole where RoleId=" + roleid);
                database.ExecuteBySql(sbUserRole);
                List <UserRole> list = new List <UserRole>();
                for (int i = 0; i < arruserid.Length; i++)
                {
                    UserRole model = new UserRole();
                    model.RoleId = int.Parse(roleid);
                    model.UserId = int.Parse(arruserid[i]);
                    list.Add(model);
                    database.Insert <UserRole>(model, isOpenTrans);
                }
                database.Commit();
                SysLogBll sysLogBll = new SysLogBll();
                sysLogBll.WriteLog <UserRole>(list, Utilities.OperationType.Add, (int)Utilities.LogSatus.Success, "角色添加用户");
                return(new Dictionary <string, object>
                {
                    { "code", "1" }
                });
            }
            catch (Exception)
            {
                database.Rollback();
                return(new Dictionary <string, object>
                {
                    { "code", "0" }
                });
            }
        }
Beispiel #13
0
        private string Update(HttpContext context)
        {
            try
            {
                SysLogBll.Create("项目备案", "更新项目备案信息", adminUser.AdminName);
                NCPEP.Model.T_XmBeian dModels = GetModels(context);
                NCPEP.Bll.T_XmBeian   bll     = new NCPEP.Bll.T_XmBeian();

                if (bll.Update(dModels))
                {
                    return("更新成功!");
                }
                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 ");
            }
        }
        public Dictionary <string, object> ModuleOperateDel()
        {
            IDatabase            database      = DataFactory.Database();
            DbTransaction        isOpenTrans   = database.BeginTrans();
            var                  context       = (HttpContextBase)Request.Properties["MS_HttpContext"];
            var                  request       = context.Request;
            string               operateidlist = request.Form["operateid"];
            List <ModuleOperate> list          = new List <ModuleOperate>();

            string[] arrid = operateidlist.Split(',');
            for (int i = 0; i < operateidlist.Length; i++)
            {
                ModuleOperate model = new ModuleOperate();
            }
            try
            {
                StringBuilder sbModuleOperateRole = new StringBuilder(" delete   ModuleOperateRole where ModuleOperateId in (" + operateidlist + ")");
                database.ExecuteBySql(sbModuleOperateRole, isOpenTrans);
                StringBuilder sbModuleOperate = new StringBuilder("delete ModuleOperate where ModuleOperateId in (" + operateidlist + ")");
                database.ExecuteBySql(sbModuleOperate, isOpenTrans);
                SysLogBll sysLogBll = new SysLogBll();
                database.Commit();
                sysLogBll.WriteLog <ModuleOperate>(list, (int)Utilities.LogSatus.Success, "模块按钮删除删除");

                return(new Dictionary <string, object>
                {
                    { "code", "1" }
                });
            }
            catch (Exception)
            {
                return(new Dictionary <string, object>
                {
                    { "code", "0" }
                });
            }
        }
Beispiel #15
0
 private string Delete(HttpContext context)
 {
     try
     {
         SysLogBll.Create("项目备案", "删除项目备案信息操作", adminUser.AdminName);
         NCPEP.Bll.T_XmBeian bll = new NCPEP.Bll.T_XmBeian();
         int id = 0;
         try { id = int.Parse(context.Request.QueryString["id"].ToString()); }
         catch { }
         if (bll.Delete(id))
         {
             return("删除操作成功!");
         }
         else
         {
             return("删除失败请重新操作,错误代码:500 ");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(string.Empty);
     }
 }
Beispiel #16
0
 public LogPresenter(ILogView view)
 {
     logFilter = new LogFilterModel();
     logBll    = new SysLogBll();
     this.view = view;
 }
Beispiel #17
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            AdminUser adminUser = Session["SuperAdminUserSession"] as AdminUser;

            if (this.FileUpload1.HasFile)
            {
                string strtype = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();//ToLower转化为小写
                if (strtype == ".jpg" || strtype == ".gif" || strtype == ".jpeg" || strtype == ".png" || strtype == ".pdf")
                {
                    //获得上传文件的大小

                    int filesize = FileUpload1.PostedFile.ContentLength;

                    if (filesize > 1024 * 1024 * 25)
                    {
                        MessageBox.Show(this, "你上传的文件太大!");
                        return;
                    }
                    else
                    {
                        NCPEP.Model.T_FujianBiao model = new NCPEP.Model.T_FujianBiao();

                        try { }
                        catch { }
                        try
                        {
                            model.fid = Request.QueryString["p"];
                        }
                        catch { }
                        model.fjdynameid = this.txtFK_UploadTypeIndicatorId.SelectedValue;
                        string strname = Guid.NewGuid().ToString("N") + System.IO.Path.GetExtension(FileUpload1.FileName);
                        string strpath = Server.MapPath("~/Super/Scan/bsrffujian/" + model.fid + "");
                        if (!System.IO.Directory.Exists(strpath))
                        {
                            System.IO.Directory.CreateDirectory(strpath);
                        }
                        FileUpload1.SaveAs(strpath + "/" + strname);
                        //string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/lt/" + model.FK_LiceTranId + "/", 0);
                        //string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/lt/" + model.FK_LiceTranId + "/" + ImgName);
                        //string pdfUrl = "~/Super/Scan/lt/" + model.FK_LiceTranId + "/";
                        //new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                        model.fjpath = strname;
                        model.fjname = adminUser.AdminName;
                        model.fjlx   = "4";//意向受让方申请附件
                        try
                        {
                            SysLogBll.Create("意向受让方申请附件", "增加标的意向受让方申请附件上传附件操作", adminUser.AdminName);
                            NCPEP.Bll.T_FujianBiao bll = new NCPEP.Bll.T_FujianBiao();

                            if (bll.Add(model) > 0)
                            {
                                MessageBox.Show(this, "上传成功。");
                                BindFujian(Request.QueryString["p"]);
                            }
                            else
                            {
                                MessageBox.Show(this, "上传失败,请重新操作! ");
                            }
                        }
                        catch (Exception ex)
                        {
                            SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
                            MessageBox.Show(this, "添加失败请重新操作,错误代码:500 ");
                        }
                    }
                }
                else
                {
                    MessageBox.Show(this, "上传的附件格式后缀名只能为.jpg,.gif,.jpeg,.png,.pdf,其他格式暂不允许上传");
                    return;
                }
            }
            else
            {
                MessageBox.Show(this, "请选择附件进行上传");
                return;
            }
        }
Beispiel #18
0
 public void Dispose()
 {
     this._DataDictionaryBll = null;
     this._EmployeeBll = null;
     this._IPBlacklistBll = null;
     this._MenuInfoBll = null;
     this._OrganizationBll = null;
     this._PurviewInfoBll = null;
     this._RoleInfoBll = null;
     this._RolePurviewBll = null;
     this._SysLogBll = null;
     this._SysLoginLogBll = null;
     this._SystemExceptionLogBll = null;
     this._SystemInfoBll = null;
     this._UserInfoBll = null;
     this._UserPurviewBll = null;
     this._UserRoleBll = null;
 }