Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)        //将Tbl_CenterStorageBatch表中的数据显示到Table中
        {
            if (!IsPostBack)
            {
                string BuildBunchId = this.Request["BuildBunchId"];

                Msg MetriesMsg = Center.QueryProductOutBunchById(int.Parse(BuildBunchId));
                if (MetriesMsg.Status)
                {
                    Tbl_OutCenterStorage oOutBunch = MetriesMsg.UserData as Tbl_OutCenterStorage;
                    if (oOutBunch != null)
                    {
                        txbPlanId.Value       = oOutBunch.PlanID.ToString();
                        txbMateriesID.Value   = oOutBunch.MateriesID.ToString();
                        txbBuildID.Value      = oOutBunch.BuildID.ToString();
                        txbBuildName.Value    = oOutBunch.BuildName;
                        txbCount.Value        = oOutBunch.Count.ToString();
                        txbMetriesType.Value  = oOutBunch.MateriesType;
                        txbProjectName.Value  = oOutBunch.ProjectName;
                        txbProductNum.Value   = oOutBunch.WorkMapID;
                        txbBuildBunchID.Value = oOutBunch.BuildBatchID.ToString();
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 更新出库批次表
        /// </summary>
        /// <returns></returns>
        public static Msg UpdateOutBunch(int BuildBunchId, int count)
        {
            Msg msg = null;

            try
            {
                using (var en = new LingYunEntities())
                {
                    Tbl_OutCenterStorage oBunch = en.Tbl_OutCenterStorage.Where(a => a.BuildBatchID == BuildBunchId).FirstOrDefault();

                    if (oBunch != null)
                    {
                        oBunch.Count = count;
                    }
                    en.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                msg = new Msg(false)
                {
                    Message = ex.Message
                };
            }
            return(msg);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据编号查询入库批次表
        /// </summary>
        /// <returns></returns>
        public static Msg EnsureInBunch(int iBuildBunch, Tbl_SiteStorage oStorage)
        {
            Msg msg = null;

            try
            {
                using (var en = new LingYunEntities())
                {
                    Tbl_OutCenterStorage oCenterBunch = en.Tbl_OutCenterStorage.Where(a => a.BuildBatchID == iBuildBunch).FirstOrDefault();
                    if (oCenterBunch != null)
                    {
                        oCenterBunch.NowAdmStatus = 128;
                        oCenterBunch.NowAdmTime   = DateTime.Now;
                    }
                    Tbl_SiteStorageBatch oSiteInBunch = en.Tbl_SiteStorageBatch.Where(a => a.BuildBatchID == iBuildBunch).FirstOrDefault();
                    if (oCenterBunch != null)
                    {
                        oSiteInBunch.NowAdmStatus = 128;
                        oCenterBunch.NowAdmTime   = DateTime.Now;
                    }
                    en.Tbl_SiteStorage.AddObject(oStorage);
                    en.SaveChanges();
                    msg = Msg.Default;
                }
            }
            catch (Exception ex)
            {
                msg = new Msg(false)
                {
                    Message = ex.Message
                };
            }
            return(msg);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 根据编号查询入库批次表
 /// </summary>
 /// <returns></returns>
 public static bool QueryOutBunchById(int BuildBunchId)
 {
     using (var en = new LingYunEntities())
     {
         Tbl_OutCenterStorage oBunch = en.Tbl_OutCenterStorage.Where(a => a.BuildBatchID == BuildBunchId).FirstOrDefault();
         if (oBunch != null)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
Ejemplo n.º 5
0
        protected void ensure_Click(object sender, EventArgs e)
        {
            bool isHave = Center.QueryIsHaveOutBunch(int.Parse(txbBuildBunchID.Value));

            if (isHave)
            {
                Msg msg = Center.UpdateOutBunch(int.Parse(txbBuildBunchID.Value), int.Parse(txbCount.Value));
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "编辑成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, msg.Message);
                }
            }
            else
            {
                Tbl_OutCenterStorage oBunch = new Tbl_OutCenterStorage();
                oBunch.PlanID       = int.Parse(txbPlanId.Value);
                oBunch.Time         = DateTime.Now;
                oBunch.MateriesID   = int.Parse(txbMateriesID.Value);
                oBunch.BuildID      = txbBuildID.Value;
                oBunch.BuildName    = txbBuildName.Value.ToString();
                oBunch.MateriesType = txbMetriesType.Value.ToString();
                oBunch.PreAdmTime   = DateTime.Now;
                oBunch.Count        = int.Parse(txbCount.Value);
                oBunch.BuildBatchID = int.Parse(txbBuildBunchID.Value);
                oBunch.ProjectName  = txbProjectName.Value;
                oBunch.WorkMapID    = txbProductNum.Value;
                Msg msg = Center.EditOutBunch(oBunch);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "编辑成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, msg.Message);
                }
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 新确认出库批次表
        /// </summary>
        /// <returns></returns>
        public static Msg NEnsureOutBunch(List <Tbl_SiteStorageBatch> list)
        {
            Msg msg = null;

            try
            {
                using (var en = new LingYunEntities())
                {
                    foreach (Tbl_SiteStorageBatch oSite in list)
                    {
                        Tbl_CenterStorage oStorage = en.Tbl_CenterStorage.Where(a => a.BuildBatchID == oSite.BuildBatchID).FirstOrDefault();
                        if (oStorage != null)
                        {
                            oStorage.NowAdmStatus = 128;
                            oStorage.NowAdmTime   = DateTime.Now;
                        }
                        Tbl_OutCenterStorage oSiteBunch = en.Tbl_OutCenterStorage.Where(a => a.BuildBatchID == oSite.BuildBatchID).FirstOrDefault();
                        if (oSiteBunch != null)
                        {
                            oSiteBunch.PreAdmStatus = 128;
                            oSiteBunch.PreAdmTime   = DateTime.Now;
                        }
                        en.Tbl_SiteStorageBatch.AddObject(oSite);
                    }
                    en.SaveChanges();
                    msg = Msg.Default;
                }
            }
            catch (Exception ex)
            {
                msg = new Msg(false)
                {
                    Message = ex.Message
                };
            }
            return(msg);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 插入出库批次表
        /// </summary>
        /// <returns></returns>
        public static Msg EditOutBunch(Tbl_OutCenterStorage oBunch)
        {
            Msg msg = null;

            try
            {
                using (var en = new LingYunEntities())
                {
                    en.Tbl_OutCenterStorage.AddObject(oBunch);


                    en.SaveChanges();
                    msg = Msg.Default;
                }
            }
            catch (Exception ex)
            {
                msg = new Msg(false)
                {
                    Message = ex.Message
                };
            }
            return(msg);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 根据指定的批次编号查询记录
        /// </summary>
        /// <param name="matries"></param>
        /// <returns></returns>
        public static Msg QueryProductOutBunchById(int Id)
        {
            Msg msg = null;

            try
            {
                using (var en = new LingYunEntities())
                {
                    Tbl_OutCenterStorage oStorage = en.Tbl_OutCenterStorage.Where(a => a.BuildBatchID == Id).FirstOrDefault();
                    if (oStorage != null)
                    {
                        msg = new Msg(true)
                        {
                            UserData = oStorage
                        };
                    }
                    else
                    {
                        msg = new Msg(false)
                        {
                            Message = "当前没有待出库的批次表"
                        };
                    }
                }
            }
            catch (Exception ex)
            {
                msg = new Msg(false)
                {
                    Message = ex.Message
                };
            }


            return(msg);
        }
Ejemplo n.º 9
0
        public static TrackMsg TrackByBatchId(int iBatchId)
        {
            TrackMsg track = null;
            string   list  = string.Empty;

            // List<string> list = new List<string>();
            try
            {
                track = new TrackMsg();
                int res = 0;
                using (var en = new LingYunEntities())
                {
                    Tbl_ProductBatch oProIn = en.Tbl_ProductBatch.Where(a => a.BuildBatchID == iBatchId && a.NowAdmStatus == 128).FirstOrDefault();
                    if (oProIn != null)
                    {
                        list += oProIn.NowAdmTime.Value.ToString();
                        Tbl_OutProductBatch oProOut = en.Tbl_OutProductBatch.Where(a => a.BuildBatchID == iBatchId && a.PreAdmStatus == 128).FirstOrDefault();
                        if (oProOut != null)
                        {
                            list += ";" + oProOut.PreAdmTime.Value.ToString();
                            Tbl_CenterStorageBatch oCenIn = en.Tbl_CenterStorageBatch.Where(a => a.BuildBatchID == iBatchId && a.NowAdmStatus == 128).FirstOrDefault();
                            if (oCenIn != null)
                            {
                                list += ";" + oCenIn.NowAdmTime.Value.ToString();
                                Tbl_OutCenterStorage oCenOut = en.Tbl_OutCenterStorage.Where(a => a.BuildBatchID == iBatchId && a.PreAdmStatus == 128).FirstOrDefault();
                                if (oCenOut != null)
                                {
                                    list += ";" + oCenOut.PreAdmTime.Value.ToString();
                                    Tbl_SiteStorageBatch oSiteIn = en.Tbl_SiteStorageBatch.Where(a => a.BuildBatchID == iBatchId && a.NowAdmStatus == 128).FirstOrDefault();
                                    if (oSiteIn != null)
                                    {
                                        list += ";" + oSiteIn.NowAdmTime.Value.ToString();
                                        Tbl_OutSiteStorage oSiteOut = en.Tbl_OutSiteStorage.Where(a => a.BuildBatchID == iBatchId && a.PreAdmStatus == 128).FirstOrDefault();
                                        if (oSiteOut != null)
                                        {
                                            list += ";" + oSiteOut.PreAdmTime.Value.ToString();
                                            res   = (int)BatchStatus.待领料;
                                        }
                                        else
                                        {
                                            res = (int)BatchStatus.现场仓库待出库审批;
                                        }
                                    }
                                    else
                                    {
                                        res = (int)BatchStatus.现场仓库入库待审批;
                                    }
                                }
                                else
                                {
                                    res = (int)BatchStatus.中心仓库待出库审批;
                                }
                            }
                            else
                            {
                                res = (int)BatchStatus.中心仓库入库待审批;
                            }
                        }
                        else
                        {
                            res = (int)BatchStatus.加工仓库待出库审批;
                        }
                    }
                    else
                    {
                        res = (int)BatchStatus.加工仓库入库待审批;
                    }



                    //Tbl_SiteStorage oSite = en.Tbl_SiteStorage.Where(a => a.BuildBatchID == iBatchId).FirstOrDefault();
                    //Tbl_CenterStorage oCenter = en.Tbl_CenterStorage.Where(a => a.BuildBatchID == iBatchId).FirstOrDefault();
                    //Tbl_ProductStorage oPro = en.Tbl_ProductStorage.Where(a => a.BuildBatchID == iBatchId).FirstOrDefault();
                    //if (oSite != null)
                    //{
                    //    Tbl_OutSiteStorage oOut = en.Tbl_OutSiteStorage.Where(a => a.BuildBatchID == iBatchId).FirstOrDefault();
                    //    if (oOut ==null)
                    //        res = (int)BatchStatus.现场仓库待出库审批;
                    //    else
                    //        res = (int)BatchStatus.待领料;
                    //}
                    //else if (oCenter != null)
                    //{
                    //    Tbl_OutCenterStorage oOut = en.Tbl_OutCenterStorage.Where(a => a.BuildBatchID == iBatchId).FirstOrDefault();
                    //    if (oOut==null)
                    //        res = (int)BatchStatus.中心仓库待出库审批;
                    //    else
                    //        res = (int)BatchStatus.现场仓库入库待审批;
                    //}
                    //else if (oPro != null)
                    //{
                    //    Tbl_OutProductBatch oOut = en.Tbl_OutProductBatch.Where(a => a.BuildBatchID == iBatchId).FirstOrDefault();
                    //    if (oOut==null)
                    //    res = (int)BatchStatus.加工仓库待出库审批;
                    //    else
                    //        res = (int)BatchStatus.中心仓库入库待审批;
                    //}
                    //else
                    //{
                    //
                    //}
                    track.STime  = list;
                    track.Status = res;
                }
            }
            catch (Exception ex)
            {
                track = new TrackMsg()
                {
                    Status = -1
                };
            }
            return(track);
        }
Ejemplo n.º 10
0
        private void Save(object data, int identify)
        {
            if (identify == (int)CurrentType.加工登录入库)
            {
                List <Tbl_Materies>     lMa  = data as List <Tbl_Materies>;
                List <Tbl_ProductBatch> lObj = new List <Tbl_ProductBatch>();
                foreach (Tbl_Materies oPro in lMa)
                {
                    Tbl_ProductBatch oSto = new Tbl_ProductBatch();

                    oSto.BuildID          = oPro.BuildNum;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.Count            = oPro.TotalNum;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = 0;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 1;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.NowAdmStatus     = 1;
                    oSto.NowAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.ProcessingNum;
                    lObj.Add(oSto);
                }
                Msg msg = ProductModel.NEditInBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "编辑成功");
                }


                //  CallBack call = ReturnMsg;
                //   Thread thread = new Thread(() => GetBarCode(lObj, call));
                // thread.IsBackground = true;
                //   thread.Start();
            }
            else if (identify == (int)CurrentType.加工确认入库)
            {
                List <Tbl_ProductBatch>   lMa  = data as List <Tbl_ProductBatch>;
                List <Tbl_ProductStorage> lObj = new List <Tbl_ProductStorage>();
                foreach (Tbl_ProductBatch oPro in lMa)
                {
                    Tbl_ProductStorage oSto = new Tbl_ProductStorage();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.InCount          = oPro.Count;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 128;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.NowAdmStatus     = 1;
                    oSto.NowAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = ProductModel.NEnsureInBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.加工登录出库)
            {
                List <Tbl_ProductStorage> lMa = data as List <Tbl_ProductStorage>;

                List <Tbl_OutProductBatch> lObj = new List <Tbl_OutProductBatch>();
                foreach (Tbl_ProductStorage oPro in lMa)
                {
                    Tbl_OutProductBatch oSto = new Tbl_OutProductBatch();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.Count            = oPro.InCount == null?0:(int)oPro.InCount;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 1;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.NowAdmStatus     = 1;
                    oSto.NowAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = ProductModel.NEditOurBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.加工确认出库)
            {
                List <Tbl_OutProductBatch> lMa = data as List <Tbl_OutProductBatch>;


                List <Tbl_CenterStorageBatch> lObj = new List <Tbl_CenterStorageBatch>();
                foreach (Tbl_OutProductBatch oPro in lMa)
                {
                    Tbl_CenterStorageBatch oSto = new Tbl_CenterStorageBatch();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.Count            = oPro.Count;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 128;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.NowAdmStatus     = 1;
                    oSto.NowAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = ProductModel.NEnsureOutBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.中心确认入库)
            {
                List <Tbl_CenterStorageBatch> lMa = data as List <Tbl_CenterStorageBatch>;


                List <Tbl_CenterStorage> lObj = new List <Tbl_CenterStorage>();
                foreach (Tbl_CenterStorageBatch oPro in lMa)
                {
                    Tbl_CenterStorage oSto = new Tbl_CenterStorage();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.InCount          = oPro.Count;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 128;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.NowAdmStatus     = 1;
                    oSto.NowAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = Center.NEnsureInBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.中心登录出库)
            {
                List <Tbl_CenterStorage> lMa = data as List <Tbl_CenterStorage>;

                List <Tbl_OutCenterStorage> lObj = new List <Tbl_OutCenterStorage>();
                foreach (Tbl_CenterStorage oPro in lMa)
                {
                    Tbl_OutCenterStorage oSto = new Tbl_OutCenterStorage();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.Count            = oPro.Count;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 1;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = Center.NEditOutBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.中心确认出库)
            {
                List <Tbl_OutCenterStorage> lMa = data as List <Tbl_OutCenterStorage>;



                List <Tbl_SiteStorageBatch> lObj = new List <Tbl_SiteStorageBatch>();
                foreach (Tbl_OutCenterStorage oPro in lMa)
                {
                    Tbl_SiteStorageBatch oSto = new Tbl_SiteStorageBatch();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.Count            = oPro.Count;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 128;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = Center.NEnsureOutBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.现场确认入库)
            {
                List <Tbl_SiteStorageBatch> lMa = data as List <Tbl_SiteStorageBatch>;

                List <Tbl_SiteStorage> lObj = new List <Tbl_SiteStorage>();
                foreach (Tbl_SiteStorageBatch oPro in lMa)
                {
                    Tbl_SiteStorage oSto = new Tbl_SiteStorage();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.InCount          = oPro.Count;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 128;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = SiteStorageModel.NEnsureInBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.现场登录出库)
            {
                List <Tbl_SiteStorage>    lMa  = data as List <Tbl_SiteStorage>;
                List <Tbl_OutSiteStorage> lObj = new List <Tbl_OutSiteStorage>();
                foreach (Tbl_SiteStorage oPro in lMa)
                {
                    Tbl_OutSiteStorage oSto = new Tbl_OutSiteStorage();
                    oSto.BuildBatchID     = (int)oPro.BuildBatchID;
                    oSto.BuildID          = oPro.BuildID;
                    oSto.BuildName        = oPro.BuildName;
                    oSto.Count            = oPro.Count;
                    oSto.MateriesID       = oPro.MateriesID;
                    oSto.MateriesTasbleID = oPro.MateriesTasbleID;
                    oSto.MateriesType     = oPro.MateriesType;
                    oSto.PlanID           = oPro.PlanID;
                    oSto.PreAdmStatus     = 1;
                    oSto.PreAdmTime       = DateTime.Now;
                    oSto.ProjectName      = oPro.ProjectName;
                    oSto.Time             = DateTime.Now;
                    oSto.WorkMapID        = oPro.WorkMapID;
                    lObj.Add(oSto);
                }
                Msg msg = SiteStorageModel.NEditOutBunch(lObj);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
            else if (identify == (int)CurrentType.现场确认出库)
            {
                List <Tbl_OutSiteStorage> lMa = data as List <Tbl_OutSiteStorage>;


                Msg msg = SiteStorageModel.EnsureOutBunch(lMa);
                if (msg.Status)
                {
                    PageHelper.ShowAlertMsg(this, "确认成功");
                }
                else
                {
                    PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message);
                }
            }
        }