Beispiel #1
0
        protected void BatAgree_Btn_Click(object sender, EventArgs e)
        {
            string ids = Request.Form["idchk"];
            //修改公司状态,并更正名称
            DataTable dt = ualyBll.Search(ztype, ids, "", (int)ZLEnum.ConStatus.UnAudit, 0);

            foreach (DataRow dr in dt.Rows)
            {
                M_Common_UserApply ualyMod = new M_Common_UserApply().GetModelFromReader(dr);
                M_UserInfo         mu      = buser.SelReturnModel(ualyMod.UserID);
                //-------------创建公司和用户
                M_User_Plat upMod   = upBll.NewUser(mu);
                M_Plat_Comp compMod = compBll.CreateByUser(upMod);
                compMod.CompName  = ualyMod.CompName;
                compMod.CompShort = ualyMod.Info1;
                compMod.Telephone = ualyMod.Mobile;
                compMod.Mobile    = ualyMod.Mobile;
                compMod.Status    = 1;
                compBll.UpdateByID(compMod);
                upBll.Insert(upMod);
                //-------------创建部门
                DataTable userDT = GetUserDT();
                NewByUserDT(compMod, userDT);
            }
            ualyBll.ChangeByIDS(ids, (int)ZLEnum.ConStatus.Audited);
            function.WriteSuccessMsg("批量同意完成");
        }
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_Plat_Comp compMod = new M_Plat_Comp();

            if (CompID > 0)
            {
                compMod = compBll.SelReturnModel(CompID);
            }
            string path = Logo_SFile.SaveFile();

            compMod.CompLogo   = string.IsNullOrEmpty(path) ? compMod.CompLogo : path;
            compMod.CompName   = CompName_T.Text;
            compMod.CreateTime = DataConverter.CDate(CDate_T.Text);
            M_UserInfo mu = buser.GetUserByName(CUser_T.Text);

            compMod.CreateUser = mu.IsNull ? 1 : mu.UserID;//后台固定为管理员添加
            compMod.Telephone  = Telephone_T.Text;
            compMod.Mobile     = Mobile_T.Text;
            compMod.CompHref   = "http://" + CompHref_T.Text.Replace("http://", "");
            compMod.CompDesc   = CompDesc_T.Text;
            compMod.Mails      = EMail_T.Text;
            compMod.CompShort  = CompShort_T.Text;
            if (CompID > 0)
            {
                compBll.UpdateByID(compMod); function.WriteSuccessMsg("修改成功!", "CompList.aspx");
            }
            compBll.Insert(compMod);
            function.WriteSuccessMsg("添加成功!", "CompList.aspx");
        }
Beispiel #3
0
        protected void BatAgree_Btn_Click(object sender, EventArgs e)
        {
            string ids = Request.Form["idchk"];
            //修改公司状态,并更正名称
            DataTable dt = ualyBll.CompCert_Sel((int)ZLEnum.ConStatus.UnAudit, ids);

            foreach (DataRow dr in dt.Rows)
            {
                int compID = DataConvert.CLng(JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "compid"));
                compMod           = compBll.SelReturnModel(compID);
                compMod.CompName  = DataConvert.CStr(dr["Remind"]);
                compMod.CompShort = JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "compshort");
                compMod.Telephone = JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "telephone");
                compMod.Mobile    = JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "mobile");
                compMod.Status    = 1;
                compBll.UpdateByID(compMod);
            }
            ualyBll.ChangeByIDS(ids, (int)ZLEnum.ConStatus.Audited);
            function.WriteSuccessMsg("批量同意完成");
        }
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            int CompID = B_User_Plat.GetLogin().CompID;

            compMod          = compBll.SelReturnModel(CompID);
            compMod.CompName = CompName_T.Text;
            compMod.CompDesc = CompDesc_T.Text;
            //compMod.Status = Convert.ToInt32(CompStatus_T.Text);
            compMod.CompLogo  = SaveFile();
            compMod.CompHref  = CompHref_T.Text;
            compMod.CompShort = CompShort_T.Text;
            compMod.Telephone = Telephone_T.Text;
            compMod.Mobile    = Mobile_T.Text;
            if (compBll.UpdateByID(compMod))
            {
                Response.Redirect(Request.RawUrl);
            }
            else
            {
                function.Script(this, "alert('修改失败!!');");
            }
        }