예제 #1
0
        protected void btMod_Click(object sender, System.EventArgs e)
        {
            string strloginid    = this.txtLoginID.Text.Trim();
            string strnewpwd     = this.txtNewPwd.Text.Trim();
            string strnewpwdconf = this.txtNewPwdConf.Text.Trim();

            if (strnewpwd != strnewpwdconf)
            {
                this.SetErrorMsgPageBydir("Á½´ÎÊäÈëµÄÃÜÂë²»ÕýÈ·£¡");
                return;
            }
            else
            {
                Hashtable htapp   = (Hashtable)Application["appconf"];
                string    strcons = (string)htapp["cons"];
                m1 = new BusiComm.Manager(strcons);
                if (!m1.UpdateOperPwd(strloginid, strnewpwd))
                {
                    this.SetErrorMsgPageBydir("ÐÞ¸ÄÃÜÂëʧ°Ü£¬ÇëÖØÊÔ£¡");
                    return;
                }
                else
                {
                    this.SetSuccMsgPageBydir("ÐÞ¸ÄÃÜÂë³É¹¦£¡", "wfmWelcome.aspx");
                    return;
                }
            }
        }
예제 #2
0
        private void btMod_Click(object sender, System.EventArgs e)
        {
            string strloginid    = this.txtLoginID.Text.Trim();
            string strnewpwd     = this.txtNewPwd.Text.Trim();
            string strnewpwdconf = this.txtNewPwdConf.Text.Trim();

            if (strnewpwd != strnewpwdconf)
            {
                this.SetErrorMsgPageBydir("������������벻��ȷ��");
                return;
            }
            else
            {
                Hashtable htapp   = (Hashtable)Application["appconf"];
                string    strcons = (string)htapp["cons"];
                m1 = new BusiComm.Manager(strcons);
                if (!m1.UpdateOperPwd(strloginid, strnewpwd))
                {
                    this.SetErrorMsgPageBydir("�޸�����ʧ�ܣ������ԣ�");
                    return;
                }
                else
                {
                    this.SetSuccMsgPageBydir("�޸�����ɹ���", "/AMSApp/paraconf/wfmLoginPwd.aspx");
                    return;
                }
            }
        }
예제 #3
0
        private void btAdd_Click(object sender, System.EventArgs e)
        {
            string strDeptFlag = ddlDept.SelectedValue;

            if (strDeptFlag == "全部门店")
            {
                strDeptFlag = "all";
            }
            string strContent = txtContent.Text.Trim();

            strContent = strContent.Replace("\r\n", "");
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            m1 = new BusiComm.Manager(strcons);
            if (!m1.InsertNotice(strDeptFlag, strContent))
            {
                this.SetErrorMsgPageBydir("添加系统通知错误!");
                return;
            }
            else
            {
                this.SetSuccMsgPageBydir("添加系统通知成功!", "");
                return;
            }
        }
예제 #4
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (Session["Login"] == null)
            {
                Response.Redirect("../Exit.aspx");
                return;
            }

            if (!IsPostBack)
            {
                if (Request.QueryString.HasKeys())
                {
                    string strid = Request.QueryString["id"].ToString();
                    if (strid != null && strid != "")
                    {
                        Hashtable htapp   = (Hashtable)Application["appconf"];
                        string    strcons = (string)htapp["cons"];
                        m1 = new Manager(strcons);

                        string strActive = m1.getNoticeActiveFlag(strid);
                        if (strActive != "0")
                        {
                            this.SetErrorMsgPageBydir("本条通知已经发送过,请在系统通知管理界面上重新查询刷新!");
                            return;
                        }
                        else
                        {
                            DateTime dtCreateDate = DateTime.Now;
                            string   strYDate     = dtCreateDate.Year.ToString();
                            string   strMDate     = dtCreateDate.Month.ToString();
                            string   strDDate     = dtCreateDate.Day.ToString();
                            if (strMDate.Length < 2)
                            {
                                strMDate = "0" + strMDate;
                            }
                            if (strDDate.Length < 2)
                            {
                                strDDate = "0" + strDDate;
                            }
                            string strCreateDate = strYDate + strMDate + strDDate;
                            int    todaycount    = int.Parse(m1.getNotiSerial(strCreateDate));
                            if (!CenterToDeptNotice(todaycount, dtCreateDate, strCreateDate, strid))
                            {
                                this.SetErrorMsgPageBydir("发送系统通知出错,请重试!");
                                return;
                            }
                            else
                            {
                                m1.UpdateNotice(strid);
                                this.SetSuccMsgPageBydir("发送系统通知成功!", "paraconf/wfmNotice.aspx");
                                return;
                            }
                        }
                    }
                }

                this.FillDropDownList("tbCommCode", ddlDept, "vcCommSign ='MD'", "全部门店");
            }
        }
예제 #5
0
        private void DGBind()
        {
            Session.Remove("Query");
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            m1 = new BusiComm.Manager(strcons);
            try
            {
                DataTable dtout = m1.GetAssType();
                if (dtout == null)
                {
                    this.SetErrorMsgPageBydir("查询出错,请重试!");
                    return;
                }

                Session["Query"]             = dtout;
                this.DataGrid1.EditItemIndex = -1;
                this.DataGrid1.DataSource    = dtout;
                this.DataGrid1.DataBind();
                ((Button)this.DataGrid1.Items[0].Cells[4].Controls[0]).Visible = false;
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
                return;
            }
        }
예제 #6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                Hashtable htapp            = (Hashtable)Application["appconf"];
                string    strcons          = (string)htapp["cons"];
                m1 = new Manager(strcons);
                switch (this.hfAssState.Value)
                {
                case "0":
                    m1.LossCard(this.lblCardId.Text, this.hfAssId.Value, ls1.strOperName, ls1.strDeptID);
                    this.SetSuccMsgPageBydir("挂失成功", "BusiQuery/wfmAssInfo.aspx");
                    break;

                case "1":
                    m1.CancelLossCard(this.lblCardId.Text, this.hfAssId.Value, ls1.strOperName, ls1.strDeptID);
                    this.SetSuccMsgPageBydir("解挂成功", "BusiQuery/wfmAssInfo.aspx");
                    break;
                }
            }
            catch (Exception ex)
            {
                this.clog.WriteLine(ex);
                this.SetErrorMsgPageBydirHistory(ex.Message);
                return;
            }
        }
예제 #7
0
        protected void btnok_Click(object sender, System.EventArgs e)
        {
            ArrayList alnewoperfunc = new ArrayList();

            foreach (ListItem liFunctionList in this.cblFunc.Items)
            {
                if (liFunctionList.Selected)
                {
                    CMSMStruct.MenuStruct mstmp = new CommCenter.CMSMStruct.MenuStruct();
                    mstmp.strFuncName    = liFunctionList.Text;
                    mstmp.strFuncAddress = liFunctionList.Value;
                    alnewoperfunc.Add(mstmp);
                }
            }

            string strOperID = this.lblOperID.Text.Trim();

            if (strOperID == "")
            {
                this.SetErrorMsgPageBydir("操作员信息错误,请重试!");
                return;
            }
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            m1 = new BusiComm.Manager(strcons);
            string strFuncType = txtCS.Text;

            if (m1.UpdateOperPurview(strOperID, alnewoperfunc, strFuncType))
            {
                if (strFuncType == "BS")
                {
                    this.SetSuccMsgPageBydir("操作员权限修改成功!", "paraconf/wfmLoginOper.aspx");
                }
                else
                {
                    this.SetSuccMsgPageBydir("操作员权限修改成功!", "paraconf/wfmDeptOperManage.aspx");
                }
                return;
            }
            else
            {
                this.SetErrorMsgPageBydir("操作员权限修改失败,请重试!");
                return;
            }
        }
예제 #8
0
        protected void Button1_Click(object sender, System.EventArgs e)
        {
            Session.Remove("QUERY");
            Session.Remove("toExcel");

            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            m1 = new Manager(strcons);

            Hashtable htPara       = new Hashtable();
            string    strLoginName = txtLoginName.Text.Trim();

            htPara.Add("strLoginName", strLoginName);
            string strDeptID = ddlDept.SelectedValue;

            if (strDeptID == "全部")
            {
                strDeptID = "";
            }
            htPara.Add("strDeptID", strDeptID);

            try
            {
                DataTable dtout = m1.GetLoginOper(htPara);
                if (dtout == null)
                {
                    this.SetErrorMsgPageBydir("查询出错,请重试!");
                    btnExcel.Enabled = false;
                    return;
                }
                else
                {
                    this.TableConvert(dtout, "门店", "AllMD");
                    this.TableConvert(dtout, "查看权限", "tbCommCode", "vcCommSign='CLT'");
                    dtout.TableName = "网站操作员清单";
                    DataTable dtexcel = dtout.Copy();
                    Session["QUERY"] = dtout;
                    dtexcel.Columns.Remove("功能权限");
                    dtexcel.Columns.Remove("操作");
                    Session["toExcel"] = dtexcel;

                    if (dtout.Rows.Count <= 0)
                    {
                        btnExcel.Enabled = false;
                    }
                    else
                    {
                        btnExcel.Enabled = true;
                    }
                }

                UcPageView1.MyDataGrid.PageSize = 30;
                DataView dvOut = new DataView(dtout);
                this.UcPageView1.MyDataSource = dvOut;
                this.UcPageView1.BindGrid();
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
                return;
            }
        }
예제 #9
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (!IsPostBack)
            {
                string strLoginID  = this.Request.QueryString["id"].ToString();
                string strOperName = this.Request.QueryString["name"].ToString();
                string strFuncType = this.Request.QueryString["FuncType"].ToString();
                this.txtCS.Text = strFuncType;
                if (strLoginID == null || strLoginID == "" || strOperName == null || strOperName == "" || strFuncType == null || strFuncType == "")
                {
                    this.SetErrorMsgPageBydirHistory("所选操作员登录ID错误,请重试!");
                    return;
                }
                else
                {
                    this.lblOperID.Text   = strLoginID;
                    this.lblOperName.Text = strOperName;

                    Hashtable htapp   = (Hashtable)Application["appconf"];
                    string    strcons = (string)htapp["cons"];
                    m1 = new BusiComm.Manager(strcons);
                    //if(strFuncType="BS")
                    DataSet   dsout      = m1.GetFuncList(strLoginID, strFuncType);
                    DataTable dtfunclist = dsout.Tables["funclist"];
                    DataTable dtoperfunc = dsout.Tables["operfunc"];
                    if (dtfunclist != null)
                    {
                        cblFunc.DataSource     = dtfunclist;
                        cblFunc.DataTextField  = "cnvcFuncName";
                        cblFunc.DataValueField = "cnvcFuncAddress";

                        cblFunc.DataBind();

                        foreach (ListItem liFunctionList in this.cblFunc.Items)
                        {
                            if (liFunctionList.Selected)
                            {
                                liFunctionList.Selected = false;
                            }
                        }
                        {
                            foreach (ListItem liFunctionList in this.cblFunc.Items)
                            {
                                if (dtoperfunc != null && dtoperfunc.Rows.Count > 0)
                                {
                                    foreach (DataRow drOperFunc in dtoperfunc.Rows)
                                    {
                                        if (drOperFunc["vcFuncName"].ToString().Equals(liFunctionList.Text))
                                        {
                                            liFunctionList.Selected = true;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        this.SetErrorMsgPageBydirHistory("获取功能列表错误!");
                        return;
                    }
                }
            }
        }
예제 #10
0
        protected void btQuery_Click(object sender, System.EventArgs e)
        {
            Session.Remove("QUERY");
            Session.Remove("toExcel");
            strBeginDate = Request.Form["txtBegin"].ToString();
            strEndDate   = Request.Form["txtEnd"].ToString();
            if (strBeginDate == "" || strEndDate == "" || strBeginDate == null || strEndDate == null)
            {
                this.SetErrorMsgPageBydir("时间不能为空,请重新选择时间!");
                return;
            }

            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            m1 = new BusiComm.Manager(strcons);

            Hashtable htPara    = new Hashtable();
            string    strDeptID = ddlDept.SelectedValue;

            if (strDeptID == "全部")
            {
                strDeptID = "";
            }
            CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
            if (ls1.strLimit != "CL001")
            {
                strDeptID = ls1.strDeptID + "','all";
            }
            htPara.Add("strDeptID", strDeptID);
            htPara.Add("strBegin", strBeginDate);
            htPara.Add("strEnd", strEndDate);
            htPara.Add("strContent", txtContent.Text.Trim());

            try
            {
                DataTable dtout = m1.GetNotice(htPara);
                if (dtout == null)
                {
                    this.SetErrorMsgPageBydir("查询出错,请重试!");
                    btnExcel.Enabled = false;
                    return;
                }
                else
                {
                    this.TableConvert(dtout, "发往门店", "tbCommCode", "vcCommSign='MD'");
                    dtout.TableName = "系统通知清单";
                    DataTable dtexcel = dtout.Copy();
                    Session["QUERY"] = dtout;
//					dtexcel.Columns.Remove("操作");
                    Session["toExcel"] = dtexcel;
                    if (dtout.Rows.Count <= 0)
                    {
                        btnExcel.Enabled = false;
                    }
                    else
                    {
                        if (ls1.strLimit == "CL001")
                        {
                            btnExcel.Enabled = true;
                        }
                    }
                }

                UcPageView1.MyDataGrid.PageSize = 30;
                DataView dvOut = new DataView(dtout);
                this.UcPageView1.MyDataSource = dvOut;
                this.UcPageView1.BindGrid();
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
                return;
            }
        }
예제 #11
0
        protected void btnAdd_Click(object sender, System.EventArgs e)
        {
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            m1 = new Manager(strcons);
            if (this.txtAssTypeName.Text.Trim().Length >= 10)
            {
                this.Popup("会员类型名称不能超过5个中文字!");
                return;
            }
            if (this.txtAssTypeCode.Text.Trim().Length != 5)
            {
                this.Popup("会员类型编码必须为5个字符!");
                return;
            }
            else if (this.txtAssTypeCode.Text.Trim().Substring(0, 2) != "AT")
            {
                this.Popup("会员类型编码必须与“AT”开头!");
                return;
            }
            else if (m1.GetAssTypeExist(this.txtAssTypeCode.Text.Trim()))
            {
                this.Popup("会员类型编码已经存在!");
                return;
            }
            if (this.txtAssTypeRate.Text.Trim() == "")
            {
                this.Popup("折扣不能为空!");
                return;
            }
            else if (!this.JudgeIsNum(this.txtAssTypeRate.Text.Trim(), "折扣必须是数字,!"))
            {
                return;
            }
            else if (this.txtAssTypeRate.Text.Trim() == "1" || this.txtAssTypeRate.Text.Trim() == "10")
            {
                this.Popup("折扣必须是0到10以内的数字,且不能为1和10!");
                return;
            }
            else if (double.Parse(this.txtAssTypeRate.Text.Trim()) < 0 || double.Parse(this.txtAssTypeRate.Text.Trim()) >= 10)
            {
                this.Popup("折扣必须是0到10以内的数字,且不能为1和10!");
                return;
            }

            if (this.ddlDisp.SelectedIndex == 0)
            {
                this.Popup("请选择是否屏蔽!");
                return;
            }

            string strComments = "";

            if (this.ddlDisp.SelectedIndex == 1)
            {
                strComments = "X" + this.txtAssTypeRate.Text.Trim();
            }
            else
            {
                strComments = "Y" + this.txtAssTypeRate.Text.Trim();
            }
            try
            {
                if (!m1.ModifyAssType(this.txtAssTypeCode.Text.Trim(), this.txtAssTypeName.Text.Trim(), strComments, "ADD"))
                {
                    this.SetErrorMsgPageBydir("添加会员类型出错,请重试!");
                    return;
                }
                else
                {
                    this.Popup("添加会员类型成功!");
                    this.DGBind();
                    return;
                }
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("系统错误,请重试!");
                return;
            }
        }
예제 #12
0
        private void DataGrid1_UpdateCommand(object source, DataGridCommandEventArgs e)
        {
            string strAssTypeName = ((TextBox)e.Item.Cells[0].Controls[0]).Text.Trim();
            string strAssTypeCode = e.Item.Cells[1].Text.Trim();
            string strAssTypeRate = ((TextBox)e.Item.Cells[2].Controls[0]).Text.Trim();
            string strComments    = ((DropDownList)e.Item.Cells[3].Controls[1]).SelectedItem.Text.Trim();

            if (strAssTypeName.Length >= 10)
            {
                this.Popup("会员类型名称不能超过5个中文字!");
                return;
            }
            if (strAssTypeRate == "")
            {
                this.Popup("折扣不能为空!");
                return;
            }
            else if (!this.JudgeIsNum(strAssTypeRate, "折扣必须是数字,!"))
            {
                return;
            }
            else if (strAssTypeRate == "1" || strAssTypeRate == "10")
            {
                this.Popup("折扣必须是0到10以内的数字,且不能为1和10!");
                return;
            }
            else if (double.Parse(strAssTypeRate) < 0 || double.Parse(strAssTypeRate) >= 10)
            {
                this.Popup("折扣必须是0到10以内的数字,且不能为1和10!");
                return;
            }

            if (strComments == "是")
            {
                strComments = "X" + strAssTypeRate;
            }
            else
            {
                strComments = "Y" + strAssTypeRate;
            }

            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            m1 = new Manager(strcons);
            try
            {
                if (!m1.ModifyAssType(strAssTypeCode, strAssTypeName, strComments, "MOD"))
                {
                    this.SetErrorMsgPageBydir("修改会员类型出错,请重试!");
                    return;
                }
                else
                {
                    this.Popup("修改会员类型成功!");
                    this.DGBind();
                    return;
                }
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("系统错误,请重试!");
                return;
            }
        }