Esempio n. 1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            this.btnExcel.Attributes.Add("onclick", "javascript:window.open('../DataGridToExcel.aspx', 'Sample', 'toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=no,resizable=yes,copyhistory=yes,width=790,height=520,left=0,top=0')");
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
//				if(ls1.strLimit!="CL001")
//				{
//					this.SetErrorMsgPageBydir("对不起,你没有权限使用此功能!");
//					return;
//				}
                if (!IsPostBack)
                {
                    this.FillDropDownList("tbCommCode", ddlAssType, "vcCommSign ='AT'", "全部");
                    this.FillDropDownList("tbCommCode", ddlDept, "vcCommSign ='MD'", "全部");
                    if (ls1.strLimit != "CL001")
                    {
                        ddlDept.Items.FindByValue(ls1.strDeptID).Selected = true;
                        ddlDept.Enabled = false;
                    }
                    strBeginDate = DateTime.Now.ToShortDateString();
                    strEndDate   = DateTime.Now.ToShortDateString();
                    string    strDept = ddlDept.SelectedValue;
                    Hashtable htapp   = (Hashtable)Application["appconf"];
                    string    strcons = (string)htapp["cons"];
                    busiq = new BusiComm.BusiQuery(strcons);
                    DataTable dtoper = busiq.GetConsOperList(strDept, strBeginDate, strEndDate);
                    this.FillDropDownList(dtoper, ddlOper, "全部");
                    Session.Remove("QUERY");
                    Session.Remove("toExcel");
                    Session.Remove("page_view");
                }
                else
                {
                    strBeginDate = Request.Form["txtBegin"].ToString();
                    strEndDate   = Request.Form["txtEnd"].ToString();
                }
                if (this.UcPageView1.MyDataGrid.DataSource != null)
                {
                    if (((DataView)this.UcPageView1.MyDataGrid.DataSource).Count > 0)
                    {
                        UcPageView1.FootBar.Visible = true;
                        btnExcel.Enabled            = true;
                    }
                    else
                    {
                        btnExcel.Enabled = false;
                    }
                }
                else
                {
                    btnExcel.Enabled = false;
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
Esempio n. 2
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     // Put user code to initialize the page here
     this.btnExcel.Attributes.Add("onclick", "javascript:window.open('../DataGridToExcel.aspx', 'Sample', 'toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=no,resizable=yes,copyhistory=yes,width=790,height=520,left=0,top=0')");
     if (Session["Login"] != null)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (!IsPostBack)
         {
             this.FillDropDownList("AllMD", ddlDept, "vcCommSign='MD'", "全部");
             if (ls1.strLimit != "CL001")
             {
                 ddlDept.Items.FindByValue(ls1.strDeptID).Selected = true;
                 ddlDept.Enabled = false;
             }
             Session.Remove("QUERY");
             Session.Remove("toExcel");
             Session.Remove("page_view");
         }
     }
     else
     {
         Response.Redirect("../Exit.aspx");
     }
 }
Esempio n. 3
0
        protected void btnSendOK_Click(object sender, System.EventArgs e)
        {
            DataTable dtSendReceiveID = (DataTable)Session["SendReceiveID"];
            Hashtable htapp           = (Hashtable)Application["appconf"];
            string    strcons         = (string)htapp["cons"];

            StoBusi = new BusiComm.StorageBusi(strcons);
            try
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                string strOperDate         = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();
                if (StoBusi.UpdateBatchBillOfReceiveSend(dtSendReceiveID, ls1.strOperName, strOperDate))
                {
                    this.SetSuccMsgPageBydir("领料单发货成功!", "Storage/wfmBillOfReceive.aspx");
                }
                else
                {
                    this.SetErrorMsgPageBydir("领料单发货时发生错误,请重试!");
                }
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
            }
        }
Esempio n. 4
0
        private string newtbSupplier(HttpContext context)
        {
            try
            {
                using (AMSCM.Models.AMSCM amscm = new AMSCM.Models.AMSCM())
                {
                    AMSCM.Models.tbSupplier tbSupplier = new AMSCM.Models.tbSupplier();
                    tbSupplier.cnvcCode     = context.Request.Form["cnvcCode"];
                    tbSupplier.cnvcName     = context.Request.Form["cnvcName"];
                    tbSupplier.cnvcAddress  = context.Request.Form["cnvcAddress"];
                    tbSupplier.cnvcPostCode = context.Request.Form["cnvcPostCode"];
                    tbSupplier.cnvcPhone    = context.Request.Form["cnvcPhone"];
                    tbSupplier.cnvcFax      = context.Request.Form["cnvcFax"];
                    tbSupplier.cnvcEmail    = context.Request.Form["cnvcEmail"];
                    tbSupplier.cnvcLinkName = context.Request.Form["cnvcLinkName"];
                    //tbSupplier.cnvcCreateOper = context.Request.Form["cnvcCreateOper"];
                    CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)context.Session["Login"];
                    tbSupplier.cnvcCreateOper = ls1.strOperName;
                    tbSupplier.cndCreateDate  = DateTime.Now;//context.Request.Form["cndCreateDate"];
                    tbSupplier.cnbInvalid     = context.Request.Form["cnbInvalid"] == "on"?true:false;

                    amscm.tbSupplier.Add(tbSupplier);
                    amscm.SaveChanges();
                }
            }
            catch (DbUpdateException dex)
            {
                ExceptionPolicy.HandleException(dex, ServiceHelper.ExceptionPolicy);
                return(ServiceHelper.JsonSerializer <JEasyUIResult>(new JEasyUIResult(false, dex.Message)));
            }
            return(ServiceHelper.JsonSerializer <JEasyUIResult>(new JEasyUIResult(true, "")));
        }
Esempio n. 5
0
        public bool UpdateLogin(CMSMStruct.LoginStruct lsnew, CMSMStruct.LoginStruct lsold)
        {
            string sqlset = "";

            if (lsnew.strOperName != lsold.strOperName)
            {
                sqlset += "vcOperName='" + lsnew.strOperName + "',";
            }
            if (lsnew.strLimit != lsold.strLimit)
            {
                sqlset += "vcLimit='" + lsnew.strLimit + "',";
            }
            if (lsnew.strDeptID != lsold.strDeptID)
            {
                sqlset += "vcDeptID='" + lsnew.strDeptID + "',";
            }

            if (sqlset != "")
            {
                sqlset = sqlset.Substring(0, sqlset.Length - 1);
                int recount = opa.UpdateLogin(lsold.strLoginID, sqlset);
                if (recount <= 0)
                {
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 6
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     // 在此处放置用户代码以初始化页面
     if (Session["Login"] == null)
     {
         Response.Redirect("../Exit.aspx");
         return;
     }
     if (!this.IsPostBack)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         Session.Remove("QUERY");
         strBeginDate = DateTime.Now.ToShortDateString();
         strEndDate   = DateTime.Now.ToShortDateString();
         this.FillDropDownList("tbNameCodeToStorage", this.ddlMaterialType, "vcCommSign='MaterialType'", "全部");
         this.FillDropDownList("NewDept", this.ddlDept, "vcCommSign='SalesRoom'");
         if (ls1.strDeptID != "CEN00" && ls1.strLimit != "CL001")
         {
             this.ddlDept.SelectedIndex = this.ddlDept.Items.IndexOf(this.ddlDept.Items.FindByValue(ls1.strNewDeptID));
             this.ddlDept.Enabled       = false;
         }
     }
     else
     {
         strBeginDate = Request.Form["txtBegin"].ToString();
         strEndDate   = Request.Form["txtEnd"].ToString();
     }
 }
Esempio n. 7
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // 在此处放置用户代码以初始化页面
            if (Session["Login"] == null)
            {
                Response.Redirect("../Exit.aspx");
                return;
            }
            string    strAssid  = Request.QueryString["aid"];
            string    strCardid = Request.QueryString["cid"];
            Hashtable htapp     = (Hashtable)Application["appconf"];
            string    strcons   = (string)htapp["cons"];

            busi = new BusiComm.BusiQuery(strcons);

            CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
            if (!IsPostBack)
            {
                Session.Remove("asold");
                Session.Remove("asnew");
                CMSMStruct.AssociatorStruct ass1 = busi.GetAssDetailInfo(strAssid, strCardid);
                txtAssID.Text       = ass1.strAssID;
                txtCardID.Text      = ass1.strCardID;
                txtAssName.Text     = ass1.strAssName;
                txtSpell.Text       = ass1.strSpell;
                txtAssNbr.Text      = ass1.strAssNbr;
                txtAssType.Text     = ass1.strAssType;
                txtLinkPhone.Text   = ass1.strLinkPhone;
                txtEmail.Text       = ass1.strEmail;
                txtLinkAddress.Text = ass1.strLinkAddress;
                txtComments.Text    = ass1.strComments;
                Session["asold"]    = ass1;
            }
        }
Esempio n. 8
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            DateTime dtnow = DateTime.Now;

            this.Label1.Text = dtnow.ToLongDateString() + " " + dtnow.DayOfWeek.ToString();
            if (Session["Login"] == null)
            {
                Condition = true;
                this.Response.Redirect("Exit.aspx");
            }
            else
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                this.lbloper.Text = "²Ù×÷Ô±£º" + ls1.strOperName;
            }
//			if(!this.IsPostBack)
//			{
//				DataTable dtNotice = DataTable dtNotice = Helper.Query("select cnnNoticeID,cnvcComments,Convert(varchar(10),cndReleaseDate,21) as cndReleaseDate from tbNotice where cnvcIsActive ='1' and convert(char(10),cndInvalidDate,121) >=convert(char(10),getdate(),121)");//(DataTable)Session["tbNotice"];
//				if(	dtNotice != null && dtNotice.Rows.Count >0)
//				{
//					strPopStr ="openwin('./Pop/notice.aspx')";
//				}
//			}
        }
Esempio n. 9
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     // Put user code to initialize the page here
     if (Session["Login"] != null)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (!IsPostBack)
         {
             this.FillDropDownList("NewDept", this.ddlInDept, "vcCommSign='SalesRoom'", "全部");
             this.FillDropDownList("NewDept", this.ddlOutDept, "vcCommSign='SalesRoom'", "全部");
             strBeginDate = DateTime.Now.ToShortDateString();
             strEndDate   = DateTime.Now.ToShortDateString();
             Session.Remove("QUERY");
             Session.Remove("page_view");
         }
         else
         {
             strBeginDate = Request.Form["txtBegin"].ToString();
             strEndDate   = Request.Form["txtEnd"].ToString();
         }
     }
     else
     {
         Response.Redirect("../Exit.aspx");
     }
 }
Esempio n. 10
0
        public bool UpdateLogin(CMSMStruct.LoginStruct lsnew, CMSMStruct.LoginStruct lsold)
        {
            string sqlset = "";

            if (lsnew.strOperName != lsold.strOperName)
            {
                sqlset += "vcOperName='" + lsnew.strOperName + "',";
            }
            if (lsnew.strLimit != lsold.strLimit)
            {
                sqlset += "vcLimit='" + lsnew.strLimit + "',";
            }
            if (lsnew.strDeptID != lsold.strDeptID)
            {
                sqlset += "vcDeptID='" + lsnew.strDeptID + "',";
            }

            if (sqlset != "")
            {
                sqlset = sqlset.Substring(0, sqlset.Length - 1);
                int recount = opa.UpdateLogin(lsold.strLoginID, sqlset);
                if (recount <= 0)
                {
                    return(false);
                }
            }
            //zhh 20120912
            var    uow          = DependencyResolver.Current.GetService <IFairiesMemberManageUow>();
            var    amsuow       = DependencyResolver.Current.GetService <IAMSCMUow>();
            Common centerCommon = new Common(uow);

            centerCommon.UpdateOper(lsold.strLoginID, lsnew.strOperName, lsnew.strDeptID);
            return(true);
        }
Esempio n. 11
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     // Put user code to initialize the page here
     if (Session["Login"] != null)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (!IsPostBack)
         {
             this.FillDropDownList("NewDept", ddlDept);
             if (ls1.strDeptID != "CEN00")
             {
                 this.ddlDept.SelectedIndex = this.ddlDept.Items.IndexOf(this.ddlDept.Items.FindByValue(ls1.strNewDeptID));
                 this.ddlDept.Enabled       = false;
             }
             this.FillDropDownList("tbNameCodeToStorage", ddlProductType, "vcCommSign ='PRODUCTTYPE'");
             this.lblCheckDate.Text = DateTime.Now.ToLongDateString();
             this.FillDropDownList("PClass", ddlProductClass, "vcCommSign='" + this.ddlProductType.SelectedValue + "'");
             Session.Remove("QUERY");
             Session.Remove("page_view");
             this.btnCheckOk.Enabled = false;
             this.btnreset.Enabled   = false;
             this.btnEdit.Enabled    = false;
         }
     }
     else
     {
         Response.Redirect("../Exit.aspx");
     }
 }
Esempio n. 12
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            DateTime dtnow = DateTime.Now;

            this.Label1.Text = dtnow.ToLongDateString() + " " + dtnow.DayOfWeek.ToString();
            if (Session["Login"] == null)
            {
                Condition = true;
                this.Response.Redirect("Exit.aspx");
            }
            else
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                this.lbloper.Text = "²Ù×÷Ô±£º" + ls1.strOperName;
            }

//			if(!this.IsPostBack)
//			{
//				DataTable dtNotice = (DataTable)Session["tbNotice"];
//				if(	dtNotice != null && dtNotice.Rows.Count >0)
//				{
//					strPopStr ="openwin('./Pop/notice.aspx')";
//				}
//			}
        }
Esempio n. 13
0
 private string UpdateCost(HttpContext context)
 {
     try
     {
         string strOperId           = context.User.Identity.Name;
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)context.Session["Login"];
         string strOperName         = ls1.strOperName;
         int    icnnYear            = Convert.ToInt32(context.Request.Form["cnnYear"]);
         int    icnnMonth           = Convert.ToInt32(context.Request.Form["cnnMonth"]);
         AMSCM.Models.tbMonthlyBalance tbMonthlyBalance = new AMSCM.Models.tbMonthlyBalance();
         tbMonthlyBalance.cnnYear  = icnnYear;
         tbMonthlyBalance.cnnMonth = icnnMonth;
         using (AMSCM.Models.AMSCM amscm = new AMSCM.Models.AMSCM())
         {
             Compute(amscm, tbMonthlyBalance, strOperId, strOperName);
         }
     }
     catch (DbUpdateException dex)
     {
         ExceptionPolicy.HandleException(dex, ServiceHelper.ExceptionPolicy);
         return(ServiceHelper.JsonSerializer <JEasyUIResult>(new JEasyUIResult(false, dex.Message)));
     }
     catch (Exception ex)
     {
         ExceptionPolicy.HandleException(ex, ServiceHelper.ExceptionPolicy);
         return(ServiceHelper.JsonSerializer <JEasyUIResult>(new JEasyUIResult(false, ex.Message)));
     }
     return(ServiceHelper.JsonSerializer <JEasyUIResult>(new JEasyUIResult(true, "")));
 }
Esempio n. 14
0
        private string newtbMonthlyBalance(HttpContext context)
        {
            try
            {
                //using (DXInfo.Models.AMSCM amscm = new DXInfo.Models.AMSCM())
                //{
                DXInfo.Models.tbMonthlyBalance tbMonthlyBalance = new DXInfo.Models.tbMonthlyBalance();
                tbMonthlyBalance.cnnYear      = Convert.ToInt32(context.Request.Form["cnnYear"]);
                tbMonthlyBalance.cnnMonth     = Convert.ToInt32(context.Request.Form["cnnMonth"]);
                tbMonthlyBalance.cnbIsBalance = false;

                tbMonthlyBalance.cndCreateDate = DateTime.Now;
                tbMonthlyBalance.cnvcCreater   = context.User.Identity.Name;
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)context.Session["Login"];
                tbMonthlyBalance.cnvcCreaterName = ls1.strOperName;

                Uow.tbMonthlyBalance.Add(tbMonthlyBalance);

                DXInfo.Models.tbMonthlyBalanceLog tbMonthlyBalanceLog = new DXInfo.Models.tbMonthlyBalanceLog();
                ServiceHelper.SetEntity <DXInfo.Models.tbMonthlyBalance, DXInfo.Models.tbMonthlyBalanceLog>(tbMonthlyBalance, tbMonthlyBalanceLog);
                Uow.tbMonthlyBalanceLog.Add(tbMonthlyBalanceLog);

                Uow.Commit();
                //}
            }
            catch (DbUpdateException dex)
            {
                ExceptionPolicy.HandleException(dex, ServiceHelper.ExceptionPolicy);
                return(ServiceHelper.JsonSerializer <JEasyUIResult>(new JEasyUIResult(false, dex.Message)));
            }
            return(ServiceHelper.JsonSerializer <JEasyUIResult>(new JEasyUIResult(true, "")));
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // 在此处放置用户代码以初始化页面
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                if (!IsPostBack)
                {
                    this.FillDropDownList("NewDept", ddlDept);
                    if (ls1.strDeptID != "CEN00" && ls1.strLimit != "CL001")
                    {
                        this.ddlDept.SelectedIndex = this.ddlDept.Items.IndexOf(this.ddlDept.Items.FindByValue(ls1.strNewDeptID));
                        this.ddlDept.Enabled       = false;
                    }
                    strBeginDate = DateTime.Now.ToShortDateString();
                    strEndDate   = DateTime.Now.ToShortDateString();
                    this.ddlLoseType.Items.Add(new ListItem("生产损耗", "生产损耗"));
                    this.ddlLoseType.Items.Add(new ListItem("销售中损耗", "销售中损耗"));
                    this.ddlLoseType.Items.Add(new ListItem("销售剩余损耗", "销售剩余损耗"));
                    this.ddlLoseType.SelectedIndex = 0;

                    Session.Remove("QUERY");
                    Session.Remove("page_view");
                }
                else
                {
                    strBeginDate = Request.Form["txtBegin"].ToString();
                    strEndDate   = Request.Form["txtEnd"].ToString();
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
Esempio n. 16
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     // 在此处放置用户代码以初始化页面
     if (Session["Login"] != null)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (!IsPostBack)
         {
             if (ls1.strLoginID != "admin")
             {
                 this.txtClientID.Enabled   = false;
                 this.txtClientName.Enabled = false;
                 //this.txtNewID.Enabled=false;
                 //this.txtNewName.Enabled=false;
                 //this.txtSortNum.Enabled=false;
                 this.txtComments.Enabled          = false;
                 this.btnAdd.Enabled               = false;
                 this.DataGrid1.Columns[5].Visible = false;
             }
             Session.Remove("QUERY");
         }
     }
     else
     {
         Response.Redirect("../Exit.aspx");
     }
 }
        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;
            }
        }
Esempio n. 18
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     // 在此处放置用户代码以初始化页面
     if (Session["Login"] == null)
     {
         Response.Redirect("../Exit.aspx");
         return;
     }
     if (!IsPostBack)
     {
         this.FillDropDownList("tbNameCodeToStorage", this.ddlMaterialType, "vcCommSign='MaterialType'");
         this.ClientScript.RegisterStartupScript(this.GetType(), "hide", "<script lanaguage=javascript>ShowHide('1','none');</script>");
         this.txtMaterialCode.Enabled = false;
         this.txtMaterialName.Enabled = false;
         this.txtStandardUnit.Enabled = false;
         this.txtUnit.Enabled         = false;
         this.txtPrice.Enabled        = false;
         this.txtProviderName.Enabled = false;
         this.ddlMaterialType.Enabled = false;
         this.txtCurCount.Enabled     = false;
         this.txtBatchNo.Enabled      = false;
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (ls1.strDeptID == "CEN00" || ls1.strNewDeptID == "")
         {
             this.Popup("没有操作权限,请使用部门帐号!");
             this.btnQuery.Enabled = false;
             this.btAdd.Enabled    = false;
             return;
         }
     }
 }
Esempio n. 19
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                if (!IsPostBack)
                {
                    this.FillDropDownList("NewDept", ddlDept);
                    if (ls1.strDeptID != "CEN00" && ls1.strLimit != "CL001")
                    {
                        this.ddlDept.SelectedIndex = this.ddlDept.Items.IndexOf(this.ddlDept.Items.FindByValue(ls1.strNewDeptID));
                        this.ddlDept.Enabled       = false;
                    }
                    this.ddlQueryType.Items.Add(new ListItem("全部", "全部"));
                    this.ddlQueryType.Items.Add(new ListItem("正常库存查询", "0"));
                    this.ddlQueryType.Items.Add(new ListItem("告警库存查询", "1"));
                    this.ddlQueryType.SelectedIndex = 0;

                    this.FillDropDownList("tbNameCodeToStorage", this.ddlProductType, "vcCommSign='PRODUCTTYPE'");
                    this.FillDropDownList("PClass", this.ddlProductClass, "vcCommSign='" + this.ddlProductType.SelectedValue + "'", "全部");
                    Session.Remove("QUERY");
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
Esempio n. 20
0
        private DataSet ReadFile(string strSheet)
        {
            string str      = fileUpLoad.PostedFile.FileName;
            int    i        = str.LastIndexOf("\\");
            string filename = str.Substring(i + 1);

            CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
            string strFileName         = ls1.strOperName + "_" + DateTime.Now.ToString("yyyyMMdd") + "_" + System.Guid.NewGuid().ToString();
            string strFileUpPath       = System.Configuration.ConfigurationSettings.AppSettings["FileUppath"];

            fileUpLoad.PostedFile.SaveAs(@strFileUpPath + strFileName);

            lblFileName.Text = "文件名为:" + filename;
            string          strConn = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source =" + @strFileUpPath + strFileName + ";Extended Properties=Excel 8.0";
            OleDbConnection conn    = new OleDbConnection(strConn);

            conn.Open();
            string           Sql = "select * from [" + strSheet + "]";
            OleDbDataAdapter cmd = new OleDbDataAdapter(Sql, conn);
            DataSet          ds  = new DataSet();

            cmd.Fill(ds);
            conn.Close();
            System.IO.File.Delete(@strFileUpPath + strFileName);
            return(ds);
        }
Esempio n. 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                if (!IsPostBack)
                {
                    this.FillDropDownList("tbCommCode", ddlDept, "vcCommSign ='MD' and vcCommCode<>'FYZX1'", "全部");
                    this.FillDropDownList("AllREGION", ddlRegion, "", "全部");
                    if (ls1.strLimit != "CL001")
                    {
                        ddlDept.Items.FindByValue(ls1.strDeptID).Selected = true;
                        ddlDept.Enabled   = false;
                        ddlRegion.Enabled = false;
                    }
                    this.txtBegin.Text = DateTime.Now.ToString("yyyy-MM-dd");
                    this.txtEnd.Text   = this.txtBegin.Text;
                    string strDept = ddlDept.SelectedValue;
                    if (strDept != "全部")
                    {
                        this.FillDropDownList("tbLocalLogin", ddlOper, "vcDeptId='" + strDept + "'", "全部");
                    }
                    else
                    {
                        this.FillDropDownList("tbLocalLogin", ddlOper, "", "全部");
                    }

                    Session.Remove("ConsItemUndo");
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
Esempio n. 22
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
//				if(ls1.strLimit!="CL001"&&ls1.strLimit!="CL002")
//				{
//					this.SetErrorMsgPageBydir("对不起,你没有权限使用此功能!");
//					return;
//				}
                if (!IsPostBack)
                {
                    this.FillDropDownList("tbCommCode", ddlDept, "vcCommSign ='MD'");
                    this.FillDropDownList("AllREGION", ddlRegion, "", "全部");
                    if (ls1.strLimit != "CL001")
                    {
                        ddlDept.Items.FindByValue(ls1.strDeptID).Selected = true;
                        ddlDept.Enabled   = false;
                        ddlRegion.Enabled = false;
                    }
                    strBeginDate = DateTime.Now.ToShortDateString();
                    strEndDate   = DateTime.Now.ToShortDateString();
                }
                else
                {
                    strBeginDate = Request.Form["txtBegin"].ToString();
                    strEndDate   = Request.Form["txtEnd"].ToString();
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // 在此处放置用户代码以初始化页面

            this.btnExcel.Attributes.Add("onclick", "javascript:window.open('../DataGridToExcel.aspx', 'Sample', 'toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=no,resizable=yes,copyhistory=yes,width=790,height=520,left=0,top=0')");
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];

                if (!IsPostBack)
                {
                    this.ddlOperState.Items.Add("全部");
                    this.ddlOperState.Items.Add("正常");
                    this.ddlOperState.Items.Add("冻结");
                    this.btnExcel.Enabled = false;
                    this.FillDropDownList("AllMD", ddlDept, "vcCommSign='MD' and vcCommCode not in('CEN00','FYZX1')", "全部");
                    if (ls1.strDeptID != "CEN00" && ls1.strDeptID != "FYZX1")
                    {
                        ddlDept.Items.FindByValue(ls1.strDeptID).Selected = true;
                        ddlDept.Enabled = false;
                    }
                    Session.Remove("QUERY");
                    Session.Remove("toExcel");
                    Session.Remove("page_view");
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                if (!IsPostBack)
                {
                    this.FillDropDownList("NewDept", ddlValidDept, "vcCommSign='SalesRoom'");
                    if (ls1.strDeptID != "CEN00" && ls1.strLimit != "CL001")
                    {
                        this.ddlValidDept.SelectedIndex = this.ddlValidDept.Items.IndexOf(this.ddlValidDept.Items.FindByValue(ls1.strNewDeptID));
                        this.ddlValidDept.Enabled       = false;
                    }
                    this.txtReceiveOper.Text = ls1.strOperName;
                    this.lblReceiveDate.Text = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();

                    Session.Remove("QUERY");
                    Session.Remove("page_view");
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
Esempio n. 25
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;
            }

            this.txtLoginID.Enabled = false;
            CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
            if (ls1 != null)
            {
                if (ls1.strLoginID != null && ls1.strLoginID != "")
                {
                    this.txtLoginID.Text = ls1.strLoginID;
                }
                else
                {
                    Response.Redirect("../Exit.aspx");
                    return;
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
                return;
            }
        }
Esempio n. 26
0
        private void Closed()
        {
            string    strPoID = this.txtPoID.Text.Trim();
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            StoBusi = new BusiComm.StorageBusi(strcons);
            try
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                if (StoBusi.PoSotckMainClose(strPoID, ls1.strOperName))
                {
                    this.SetSuccMsgPageBydir("采购订单完成成功!", "Storage/wfmPoStock.aspx");
                    return;
                }
                else
                {
                    this.SetErrorMsgPageBydir("采购订单完成时发生错误,请重试!");
                    return;
                }
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
                return;
            }
        }
Esempio n. 27
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     // Put user code to initialize the page here
     if (Session["Login"] != null)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (!IsPostBack)
         {
             string strvalue = "";
             string strYear  = DateTime.Now.Year.ToString();
             for (int i = 0; i < 12; i++)
             {
                 if (i != 0 && DateTime.Now.AddMonths(-i).Month == 12)
                 {
                     strYear = DateTime.Now.AddYears(-1).Year.ToString();
                 }
                 if (DateTime.Now.AddMonths(-i).Month < 10)
                 {
                     strvalue = strYear + "0" + (DateTime.Now.AddMonths(-i).Month).ToString();
                 }
                 else
                 {
                     strvalue = strYear + (DateTime.Now.AddMonths(-i).Month).ToString();
                 }
                 this.ddlAcctMonth.Items.Add(new ListItem(strvalue, strvalue));
             }
         }
         this.Image1.Visible = false;
     }
     else
     {
         Response.Redirect("../Exit.aspx");
     }
 }
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
                if (!IsPostBack)
                {
                    this.FillDropDownList("tbNameCodeToStorage", this.ddlOrderState, "vcCommSign='RECEIVE_OS'", "全部");
                    this.FillDropDownList("NewDept", this.ddlReceiveDept, "", "全部");
//					this.FillDropDownList("tbNameCodeToStorage", this.ddlGroup,"vcCommSign='GROUP'","全部");
                    if (ls1.strDeptID != "CEN00" && ls1.strLimit != "CL001")
                    {
                        this.ddlReceiveDept.SelectedIndex = this.ddlReceiveDept.Items.IndexOf(this.ddlReceiveDept.Items.FindByValue(ls1.strNewDeptID));
                        this.ddlReceiveDept.Enabled       = false;
                    }
                    strBeginDate = DateTime.Now.ToShortDateString();
                    strEndDate   = DateTime.Now.ToShortDateString();
                    Session.Remove("QUERY");
                    Session.Remove("page_view");
                }
                else
                {
                    strBeginDate = Request.Form["txtBegin"].ToString();
                    strEndDate   = Request.Form["txtEnd"].ToString();
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
Esempio n. 29
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     // Put user code to initialize the page here
     this.btnSendOK.Attributes.Add("onclick", "return confirm('请确认你已经正确填写了各门店的\"发货量\",并已将这批领料单发货。\\n\\n确认发货?');");
     if (Session["Login"] != null)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (!IsPostBack)
         {
             Session.Remove("QUERY");
             Session.Remove("SendReceiveID");
             Session.Remove("SendReceiveDetail");
             DataTable dtSendReceiveID = new DataTable();
             dtSendReceiveID.Columns.Add("cnnReceiveSerialNo");
             dtSendReceiveID.Columns.Add("cnvcReceiveType");
             DataTable dtSendReceiveDetail = new DataTable();
             Session["SendReceiveID"]     = dtSendReceiveID;
             Session["SendReceiveDetail"] = dtSendReceiveDetail;
             this.btnPrint.Enabled        = false;
         }
     }
     else
     {
         Response.Redirect("../Exit.aspx");
     }
 }
 protected void Page_Load(object sender, System.EventArgs e)
 {
     // 在此处放置用户代码以初始化页面
     this.btnExcel.Attributes.Add("onclick", "javascript:window.open('../DataGridToExcel.aspx', 'Sample', 'toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=no,resizable=yes,copyhistory=yes,width=790,height=520,left=0,top=0')");
     if (Session["Login"] != null)
     {
         CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
         if (!IsPostBack)
         {
             this.FillDropDownList("tbCommCode", ddlDept, "vcCommSign ='MD'", "全部");
             strBeginDate = DateTime.Now.ToShortDateString();
             strEndDate   = DateTime.Now.ToShortDateString();
             Session.Remove("QUERY");
             Session.Remove("toExcel");
             Session.Remove("page_view");
         }
         else
         {
             strBeginDate = Request.Form["txtBegin"].ToString();
             strEndDate   = Request.Form["txtEnd"].ToString();
         }
     }
     else
     {
         Response.Redirect("../Exit.aspx");
     }
 }