Exemple #1
0
        public ProductsController()
        {
            DataContext Context = DataContext.getInstance();

            productsFacade  = new ProductsFacade(Context);
            wareHouseFacade = new WareHouseFacade(Context);
            pWMFacade       = new PWMFacade(Context);
            lookupFacade    = new LookUpFacade(Context);
        }
        public InvoiceController()
        {
            DataContext Context = DataContext.getInstance();

            salesFacade       = new SalesOrderFacade(Context);
            salesDetailFacade = new SalesOrderDetailsFacade(Context);
            payFacade         = new PaymentFacade(Context);
            wareHouseFacade   = new WareHouseFacade(Context);
            pWMFacade         = new PWMFacade(Context);
            productsFacade    = new ProductsFacade(Context);
        }
        public HomeController()
        {
            DataContext Context = DataContext.getInstance();

            userFacade      = new UserFacade(Context);
            userlogin       = new UserLoginFacade(Context);
            wareHouseFacade = new WareHouseFacade(Context);
            productsFacade  = new ProductsFacade(Context);
            sessionContext  = new SessionContext();
            paymentFacade   = new PaymentFacade(Context);
        }
Exemple #4
0
		private void Button1_Click(object sender, System.EventArgs e)
		{
			//添加修改生产组
			//确定
			Entity.OperLog ol = new AMSApp.zhenghua.Entity.OperLog();
			ol.cnvcOperType = "添加生产组";
			ol.cnvcOperID = this.oper.strLoginID;
			ol.cnvcDeptID = this.oper.strDeptID;

			Business.WareHouseFacade whf = new WareHouseFacade();
			
			if(this.JudgeIsNull(this.txtTeamName.Text))
			{
				this.Popup("请输入生产组名称");
				return;
			}
			if(this.lblTitle.Text == "添加生产组")
			{
				ol.cnvcOperType = "添加生产组";
				Entity.Team team = new AMSApp.zhenghua.Entity.Team();
				team.cnvcTeamName = this.txtTeamName.Text;
				int ret = whf.AddTeam(ol,team);
				if(ret > 0 )
				{
					this.Popup("添加生产组成功!");
				}
				else
				{
					this.Popup("添加生产组失败!");
				}

				this.Response.Write("<script type=\"text/javascript\">window.returnValue=true;window.close()</script>");
			}
			if(this.lblTitle.Text == "修改生产组")
			{
				ol.cnvcOperType = "修改生产组";
				Entity.Team team = new AMSApp.zhenghua.Entity.Team();
				team.cnnTeamID = Convert.ToInt32(this.txtTeamID.Text);
				team.cnvcTeamName = this.txtTeamName.Text;
				int ret = whf.UpdateTeam(ol,team);
				if(ret > 0 )
				{
					this.Popup("修改生产组成功!");
				}
				else
				{
					this.Popup("修改生产组失败!");
				}

				this.Response.Write("<script type=\"text/javascript\">window.returnValue=true;window.close()</script>");
			}
		}
Exemple #5
0
        private void Button1_Click(object sender, System.EventArgs e)
        {
            Entity.OperLog ol = new AMSApp.zhenghua.Entity.OperLog();
            ol.cnvcOperType = "添加生产员";
            ol.cnvcOperID   = this.oper.strLoginID;
            ol.cnvcDeptID   = this.oper.strDeptID;

            Business.WareHouseFacade whf = new WareHouseFacade();

            if (this.JudgeIsNull(this.txtProducerName.Text))
            {
                this.Popup("请输入生产员名称");
                return;
            }
            if (this.lblTitle.Text == "添加生产员")
            {
                ol.cnvcOperType = "添加生产员";
                Entity.Producer producer = new AMSApp.zhenghua.Entity.Producer();
                producer.cnvcProducerName = this.txtProducerName.Text;
                int ret = whf.AddProducer(ol, producer);
                if (ret > 0)
                {
                    this.Popup("添加生产员成功!");
                }
                else
                {
                    this.Popup("添加生产员失败!");
                }

                this.Response.Write("<script type=\"text/javascript\">window.returnValue=true;window.close()</script>");
            }
            if (this.lblTitle.Text == "修改生产员")
            {
                ol.cnvcOperType = "修改生产员";
                Entity.Producer producer = new AMSApp.zhenghua.Entity.Producer();
                producer.cnnProducerID    = Convert.ToInt32(this.txtProducerID.Text);
                producer.cnvcProducerName = this.txtProducerName.Text;
                int ret = whf.UpdateProducer(ol, producer);
                if (ret > 0)
                {
                    this.Popup("修改生产员成功!");
                }
                else
                {
                    this.Popup("修改生产员失败!");
                }

                this.Response.Write("<script type=\"text/javascript\">window.returnValue=true;window.close()</script>");
            }
        }
        private void Button1_Click(object sender, System.EventArgs e)
        {
            //确定
            Entity.OperLog ol = new AMSApp.zhenghua.Entity.OperLog();
            ol.cnvcOperType = "添加存货档案";
            ol.cnvcOperID   = this.oper.strLoginID;
            ol.cnvcDeptID   = this.oper.strDeptID;


            Entity.Warehouse         wh  = this.GetWh();
            Business.WareHouseFacade whf = new WareHouseFacade();

            if (!this.JudgeIsNum(this.txtFrequency.Text))
            {
                this.Popup("盘点周期请输入数字");
                return;
            }
            if (this.JudgeIsNull(this.txtWhName.Text))
            {
                this.Popup("请输入仓库名称");
                return;
            }
            if (this.lblTitle.Text == "添加仓库档案")
            {
                //Entity.OperLog ol = new AMSApp.zhenghua.Entity.OperLog();
                ol.cnvcOperType = "添加存货档案";
//				ol.cnvcOperID = this.oper.strLoginID;
//				ol.cnvcDeptID = this.oper.strDeptID;
//
//
//				Entity.Warehouse wh = this.GetWh();
//				Business.WareHouseFacade whf = new WareHouseFacade();
                int ret = whf.AddWareHouse(ol, wh);
                if (ret > 0)
                {
                    this.Popup("添加仓库档案成功!");
                }
                else
                {
                    this.Popup("添加仓库档案失败!");
                }

                this.Response.Write("<script type=\"text/javascript\">window.returnValue=true;window.close()</script>");
            }
            if (this.lblTitle.Text == "修改仓库档案")
            {
                //Entity.OperLog ol = new AMSApp.zhenghua.Entity.OperLog();
                ol.cnvcOperType = "修改仓库档案";
//				ol.cnvcOperID = this.oper.strLoginID;
//				ol.cnvcDeptID = this.oper.strDeptID;
//
//
//				Entity.Warehouse wh = GetWh();
//
//				Business.WareHouseFacade whf = new WareHouseFacade();
                int ret = whf.UpdateWareHouse(ol, wh);
                if (ret > 0)
                {
                    this.Popup("修改仓库档案成功!");
                }
                else
                {
                    this.Popup("修改仓库档案失败!");
                }

                this.Response.Write("<script type=\"text/javascript\">window.returnValue=true;window.close()</script>");
            }
        }