Пример #1
0
 internal int AddLineAllocation(Prod_LineAllocationTemp _LineAllocationTemp)
 {
     try
     {
         using (var _context = new ERPSSL_LCEntities())
         {
             _context.AddToProd_LineAllocationTemp(_LineAllocationTemp);
             _context.SaveChanges();
             return(1);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
        protected void btnAdLine_OnClick(object sender, EventArgs e)
        {
            Prod_LineAllocationTemp _LineAllocationTemp = new Prod_LineAllocationTemp();

            _LineAllocationTemp.LineName      = ddlLineList.SelectedItem.Text;
            _LineAllocationTemp.LineId        = Convert.ToInt32(ddlLineList.SelectedValue);
            _LineAllocationTemp.PlanNo        = Session["PlanNo"].ToString();
            _LineAllocationTemp.TargetsAmount = Convert.ToDouble(txtTargetAmount.Text);
            _LineAllocationTemp.Create_User   = ((SessionUser)Session["SessionUser"]).UserId;
            _LineAllocationTemp.Create_Date   = DateTime.Today;
            _LineAllocationTemp.OCode         = ((SessionUser)Session["SessionUser"]).OCode;

            int result = _PlanningBLL.AddLineAllocation(_LineAllocationTemp);

            if (result == 1)
            {
                LoadTempLine();
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Save Successfully')", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Not Save')", true);
            }
        }
Пример #3
0
 internal int AddLineAllocation(Prod_LineAllocationTemp _LineAllocationTemp)
 {
     return(_PlanningDAL.AddLineAllocation(_LineAllocationTemp));
 }