Ejemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tinplinewarehouseSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotinplinewarehouseSet(tinplinewarehouse tinplinewarehouse)
 {
     base.AddObject("tinplinewarehouseSet", tinplinewarehouse);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new tinplinewarehouse object.
 /// </summary>
 /// <param name="customerid">Initial value of the customerid property.</param>
 /// <param name="custorderno">Initial value of the custorderno property.</param>
 /// <param name="cartonNumber">Initial value of the cartonNumber property.</param>
 /// <param name="styleno">Initial value of the styleno property.</param>
 /// <param name="color">Initial value of the color property.</param>
 /// <param name="size">Initial value of the size property.</param>
 /// <param name="pairqty">Initial value of the pairqty property.</param>
 /// <param name="step">Initial value of the step property.</param>
 /// <param name="workgroup">Initial value of the workgroup property.</param>
 public static tinplinewarehouse Createtinplinewarehouse(global::System.String customerid, global::System.String custorderno, global::System.String cartonNumber, global::System.String styleno, global::System.String color, global::System.String size, global::System.Decimal pairqty, global::System.String step, global::System.String workgroup)
 {
     tinplinewarehouse tinplinewarehouse = new tinplinewarehouse();
     tinplinewarehouse.customerid = customerid;
     tinplinewarehouse.custorderno = custorderno;
     tinplinewarehouse.cartonNumber = cartonNumber;
     tinplinewarehouse.styleno = styleno;
     tinplinewarehouse.color = color;
     tinplinewarehouse.size = size;
     tinplinewarehouse.pairqty = pairqty;
     tinplinewarehouse.step = step;
     tinplinewarehouse.workgroup = workgroup;
     return tinplinewarehouse;
 }
Ejemplo n.º 3
0
        /** x线封箱不满箱暂时存放产线*/
        public bool lineWarehouseSave(DataTable dt, string user, string workGroup)
        {
            try
            {
                dbInstance.BeginTransaction();
                OpenBoxDal dal = new OpenBoxDal(dbInstance);
                ///////////////////////////
                String recid = GENLSYS.MES.Common.Function.GetGUID();
                String pktype = MES_PackingType.Unpacking.ToString();
                DateTime actiondate = System.DateTime.Now;
                String factory = "";
                String userid = user;
                decimal? ttlqty = 0;
                string custorderno = "";
                int dtl = dt.Rows.Count;

                //delete old carton if exists
                //delete line warehouse, if exists
                string customerid = dt.Rows[0]["customerid"].ToString();
                custorderno = dt.Rows[0]["poid"].ToString();
                string cartonno = dt.Rows[0]["cartonNumber"].ToString();

                //get checktype from receiving
                List<MESParameterInfo> lstParam = new List<MESParameterInfo>()
                       {
                           new MESParameterInfo(){ParamName="custorderno",ParamValue=custorderno},
                           new MESParameterInfo(){ParamName="cartonno",ParamValue=cartonno} ,
                            new MESParameterInfo(){ParamName="customerid",ParamValue=customerid}

                       };

                List<tinpreceivingctndtl> ctlDtl = baseDal.GetSelectedObjects<tinpreceivingctndtl>(lstParam);
                string checktype = ctlDtl[0].checktype;

                List<MESParameterInfo> lstParam2 = new List<MESParameterInfo>() {
                          new MESParameterInfo(){ParamName="custorderno",ParamValue=custorderno},
                          new MESParameterInfo(){ParamName="cartonNumber",ParamValue= cartonno},
                          new MESParameterInfo(){ParamName="customerid",ParamValue= customerid}
                     };
                baseDal.DoDelete<tinplinewarehouse>(lstParam2);

                for (int i = 0; i < dtl; i++)
                {
                    //
                    tinplinewarehouse obj = new tinplinewarehouse();
                    obj.customerid = dt.Rows[i]["customerid"].ToString();
                    custorderno = dt.Rows[i]["poid"].ToString();
                    obj.custorderno = custorderno;
                    obj.cartonNumber = dt.Rows[i]["cartonNumber"].ToString();
                    obj.color = dt.Rows[i]["color"].ToString();
                    obj.size = dt.Rows[i]["size"].ToString();
                    obj.styleno = dt.Rows[i]["type"].ToString();

                    obj.step = "X";   //目前只有X线才暂存
                    decimal qty = decimal.Parse((dt.Rows[i]["qty2"].ToString()));
                    obj.pairqty = qty;
                    obj.checktype = checktype;

                    // obj.lastmodifiedtime =   DateTime.Now;
                    //  obj.user = user;
                    obj.workgroup = workGroup;

                    //insert opening box detail
                    localDal.DoInsert<tinplinewarehouse>(obj);

                }

                dbInstance.Commit();
                return true;
            }
            catch (Exception ex)
            {
                dbInstance.Rollback();
                return false;
                throw ex;
            }
            finally
            {
                dbInstance.CloseConnection();
            }
        }