Example #1
0
        private void InitDropDownList()
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacade(base.DataProvider);
            }
            DropDownListBuilder builder = new DropDownListBuilder(this.drpFactoryCodeQuery);

            builder.HandleGetObjectList = new GetObjectListDelegate(this._facade.GetAllFactory);
            builder.Build("FactoryCode", "FactoryCode");
            this.drpFactoryCodeQuery.Items.Insert(0, new ListItem("", ""));

            BenQGuru.eMES.BaseSetting.BaseModelFacade bmFacade = new BenQGuru.eMES.BaseSetting.BaseModelFacade(base.DataProvider);
//			builder = new DropDownListBuilder(this.drpSegmentCodeQuery);
//			builder.HandleGetObjectList = new GetObjectListDelegate(bmFacade.GetAllSegment);
//			builder.Build("SegmentCode","SegmentCode");
//			this.drpSegmentCodeQuery.Items.Insert(0, new ListItem("", ""));

            /*
             * builder = new DropDownListBuilder(this.drpWarehouseCodeQuery);
             * builder.HandleGetObjectList = new GetObjectListDelegate(this._facade.GetAllDistinctWarehouse);
             * builder.Build("WarehouseCode","WarehouseCode");
             * this.drpWarehouseCodeQuery.Items.Insert(0, new ListItem(lword.ControlText, ""));
             */

            bmFacade = null;
            builder  = null;
        }
        private string CreateStNO()
        {
            WarehouseFacade warehouseFacade = new WarehouseFacade(base.DataProvider);
            DBDateTime      dbDateTime      = FormatHelper.GetNowDBDateTime(base.DataProvider);
            string          preFix          = "IN" + dbDateTime.DBDate.ToString().Substring(2);
            object          objSerialBook   = warehouseFacade.GetSerialBook(preFix);

            if (objSerialBook == null)
            {
                SERIALBOOK serialBook = new SERIALBOOK();
                serialBook.SNPrefix  = preFix;
                serialBook.MaxSerial = "1";
                serialBook.MUser     = this.GetUserCode();
                serialBook.MDate     = dbDateTime.DBDate;
                serialBook.MTime     = dbDateTime.DBTime;

                warehouseFacade.AddSerialBook(serialBook);
                return(preFix + "0001");
            }
            else
            {
                SERIALBOOK serialBook = (SERIALBOOK)objSerialBook;
                if (serialBook.MaxSerial == "9999")
                {
                    throw new Exception("今天ēš„å…„åŗ“ęŒ‡ä»¤å·å·²ē”Øļ¼");
                }
                serialBook.MaxSerial = (Convert.ToInt32(serialBook.MaxSerial) + 1).ToString();

                warehouseFacade.UpdateSerialBook(serialBook);
                return(serialBook.SNPrefix + serialBook.MaxSerial.PadLeft(4, '0'));
            }
        }
Example #3
0
        private void InitDropDownList()
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacade(base.DataProvider);
            }
            //ę„ęŗå·„厂
            DropDownListBuilder builder = new DropDownListBuilder(this.drpFactoryFromQuery);

            builder.HandleGetObjectList = new GetObjectListDelegate(this._facade.GetAllFactory);
            builder.Build("FactoryCode", "FactoryCode");
            this.drpFactoryFromQuery.Items.Insert(0, new ListItem("", ""));
            //ē›®ę ‡å·„厂
            builder = new DropDownListBuilder(this.drpFactoryToQuery);
            builder.HandleGetObjectList = new GetObjectListDelegate(this._facade.GetAllFactory);
            builder.Build("FactoryCode", "FactoryCode");
            this.drpFactoryToQuery.Items.Insert(0, new ListItem("", ""));

            //ę„ęŗå·„ꮵ
            BenQGuru.eMES.BaseSetting.BaseModelFacade bmFacade = new BenQGuru.eMES.BaseSetting.BaseModelFacade(base.DataProvider);
//			builder = new DropDownListBuilder(this.drpSegmentFromQuery);
//			builder.HandleGetObjectList = new GetObjectListDelegate(bmFacade.GetAllSegment);
//			builder.Build("SegmentCode","SegmentCode");
//			this.drpSegmentFromQuery.Items.Insert(0, new ListItem("", ""));
//			//ē›®ę ‡å·„ꮵ
//			builder = new DropDownListBuilder(this.drpSegmentToQuery);
//			builder.HandleGetObjectList = new GetObjectListDelegate(bmFacade.GetAllSegment);
//			builder.Build("SegmentCode","SegmentCode");
//			this.drpSegmentToQuery.Items.Insert(0, new ListItem("", ""));

            bmFacade = null;
            builder  = null;
        }
Example #4
0
        //ē”Ÿęˆę–°ēš„OQCę£€éŖŒå•å·
        /// <summary>
        /// ē”Ÿęˆę–°ēš„IQCę£€éŖŒå•å·
        /// </summary>
        /// <param name="oldIqcNo">原IQCę£€éŖŒå•å·</param>
        /// <returns></returns>
        private string CreateNewIqcNo(string oldOqcNo)
        {
            //č§„åˆ™ļ¼šåŽŸOQCę£€éŖŒå•å· +_+ äø¤ä½ęµę°“号ļ¼Œå¦‚ļ¼šOQCASN00000101_01
            WarehouseFacade warehouseFacade = new WarehouseFacade(this.DataProvider);
            string          SNPrefix        = oldOqcNo + "_";
            object          objSerialBook   = warehouseFacade.GetSerialBook(SNPrefix);

            if (objSerialBook == null)
            {
                DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(this.DataProvider);
                SERIALBOOK serialBook = new SERIALBOOK();
                serialBook.SNPrefix  = SNPrefix;
                serialBook.MaxSerial = "1";
                serialBook.MUser     = this.GetUserCode();
                serialBook.MDate     = dbDateTime.DBDate;
                serialBook.MTime     = dbDateTime.DBTime;
                warehouseFacade.AddSerialBook(serialBook);

                return(SNPrefix + "01");
            }
            else
            {
                SERIALBOOK serialBook = (SERIALBOOK)objSerialBook;
                if (serialBook.MaxSerial == "99")
                {
                    return("");
                }
                serialBook.MaxSerial = (Convert.ToInt32(serialBook.MaxSerial) + 1).ToString();
                warehouseFacade.UpdateSerialBook(serialBook);

                return(serialBook.SNPrefix + serialBook.MaxSerial.PadLeft(2, '0'));
            }
        }
Example #5
0
        private void LogDN(List <BenQGuru.eMES.SAPRFCService.Domain.DN> dns, BenQGuru.eMES.SAPRFCService.Domain.SAPRfcReturn ret, string isAll)
        {
            _WarehouseFacade = new WarehouseFacade(this.DataProvider);
            foreach (BenQGuru.eMES.SAPRFCService.Domain.DN dn in dns)
            {
                DNLOG log = new DNLOG();
                log.DNLINE = dn.DNLine;
                log.DNNO   = dn.DNNO;
                log.ISALL  = isAll;
                if (ret == null)
                {
                    log.RESULT = "empty";
                }
                else
                {
                    log.RESULT = ret.Result;
                }


                log.MDATE   = FormatHelper.TODateInt(DateTime.Now);
                log.MTIME   = FormatHelper.TOTimeInt(DateTime.Now);
                log.MUSER   = GetUserCode();
                log.Qty     = dn.Qty;
                log.Unit    = dn.Unit;
                log.MESSAGE = ret != null ? ret.Message : "null";
                if (ret != null && string.IsNullOrEmpty(ret.Message))
                {
                    log.MESSAGE = "empty";
                }
                log.DNBATCHNO = dn.BatchNO;
                _WarehouseFacade.InsertDNLOG(log);
            }
        }
Example #6
0
        protected override object[] LoadDataSource(int inclusive, int exclusive)
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacade(base.DataProvider);
            }
            object[] objstkt = null;
            object[] objs    = this._facade.GetWarehouseTicketInQuery(
                string.Empty, string.Empty, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), FormatHelper.TODateInt(this.txtTransDateFromQuery.Text), FormatHelper.TODateInt(this.txtTransDateToQuery.Text), this.drpFactoryCodeQuery.SelectedValue, /*this.drpSegmentCodeQuery.SelectedValue,*/ FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWarehouseCodeQuery.Text)),
                inclusive, exclusive,
                ref objstkt);

            httkt = new Hashtable();
            if (objstkt != null)
            {
                for (int i = 0; i < objstkt.Length; i++)
                {
                    httkt.Add(((WarehouseTicket)objstkt[i]).TicketNo, objstkt[i]);
                }
            }
            httranstype = new Hashtable();
            if (objs != null && objs.Length > 0)
            {
                object[] objstrans = this._facade.GetAllTransactionType();
                for (int i = 0; i < objstrans.Length; i++)
                {
                    TransactionType type = (TransactionType)objstrans[i];
                    httranstype.Add(type.TransactionTypeCode, type.TransactionTypeName);
                }
            }
            return(objs);
        }
Example #7
0
        protected override DataRow GetGridRow(object obj)
        {
            if (facade == null)
            {
                facade = new WarehouseFacade(base.DataProvider);
            }
            DataRow          row = this.DtSource.NewRow();
            InstorageSummary s   = (InstorageSummary)obj;

            row["StorageCode"]  = s.StorageCode;
            row["ASNCCOUNT"]    = s.ASNCCOUNT;
            row["ASNDOWNCOUNT"] = s.ASNDOWNCOUNT;
            row["StorageCode"]  = s.StorageCode;

            decimal averReceive = facade.ReceiveAverPeriod(s.StorageCode, this.drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                           FormatHelper.TODateInt(dateInDateToQuery.Text));
            decimal averIQC = facade.IQCAverPeriod(s.StorageCode, string.Empty, this.drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                   FormatHelper.TODateInt(dateInDateToQuery.Text));

            decimal averOnShelf = facade.InstorageAverPeriod1(s.StorageCode, this.drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                              FormatHelper.TODateInt(dateInDateToQuery.Text));

            row["AVERINSTORAGEPERIOD"] = facade.InstorageAverPeriod(s.StorageCode, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                                    FormatHelper.TODateInt(dateInDateToQuery.Text));


            row["ASNRECEIVECOUNT"]      = s.ASNRECEIVECOUNT;
            row["RECEIVECARTONNOTOTAL"] = facade.ReceiveSummaryCartonno(s.StorageCode, drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                                        FormatHelper.TODateInt(dateInDateToQuery.Text));
            row["RECEIVETOTALWEIGHT"] = facade.ReceiveSummaryWeight(s.StorageCode, drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                                    FormatHelper.TODateInt(dateInDateToQuery.Text));


            row["RECEIVETOTALVOLUMN"] = facade.ReceiveSummaryVolume(s.StorageCode, drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                                    FormatHelper.TODateInt(dateInDateToQuery.Text));

            row["AVERRECEIVEPERIOD"] = averReceive;

            row["AVERIQCPERIOD"]        = averIQC;
            row["ONSHELFASNCOUNT"]      = s.ASNINSTORAGECOUNT;
            row["ONSHELFCARTONNOTOTAL"] = facade.OnShelfSummaryCartonno(s.StorageCode, drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                                        FormatHelper.TODateInt(dateInDateToQuery.Text));
            ;

            row["ONSHELFWEIGHTTOTAL"] = facade.OnShelfSummaryWeight(s.StorageCode, drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                                    FormatHelper.TODateInt(dateInDateToQuery.Text));



            row["ONSHELFVOLUMNTOTAL"] = facade.OnShelfSummaryVolume(s.StorageCode, drpStorageInTypeQuery.SelectedValue, FormatHelper.TODateInt(dateInDateFromQuery.Text),
                                                                    FormatHelper.TODateInt(dateInDateToQuery.Text));



            row["AVERONSHELFPERIOD"] = averOnShelf;



            return(row);
        }
Example #8
0
        protected object GetEditObject()
        {
            if (_TransferFacade == null)
            {
                _TransferFacade = new WarehouseFacade(this.DataProvider);
            }
            DBDateTime  DBDateTimeNow = FormatHelper.GetNowDBDateTime(this.DataProvider);
            InvTransfer transfer      = new InvTransfer();

            if (ViewState["operate"].ToString() == "Edit")
            {
                transfer = (InvTransfer)this._TransferFacade.GetInvTransfer(FormatHelper.CleanString(this.txtTransferNoEdit.Text));
                if (transfer == null)
                {
                    return(null);
                }
            }
            transfer.TransferNO    = FormatHelper.CleanString(this.txtTransferNoEdit.Text.Trim().ToUpper(), 40);
            transfer.Rectype       = FormatHelper.CleanString(this.DrpRECTypeEdit.SelectedValue);
            transfer.FromStorageID = FormatHelper.CleanString(this.txtFromStorageIDQueryEdit.Text.Trim().ToUpper(), 40);
            transfer.ToStorageID   = FormatHelper.CleanString(this.txtToStorageIDQueryEdit.Text.Trim().ToUpper(), 40);
            transfer.Memo          = FormatHelper.CleanString(this.txtRemark.Text, 2000);

            transfer.Mdate = DBDateTimeNow.DBDate;
            transfer.Mtime = DBDateTimeNow.DBTime;
            transfer.Muser = this.GetUserCode();

            return(transfer);
        }
        protected override int GetRowCount()
        {
            if (facade == null)
            {
                facade = new WarehouseFacade(base.DataProvider);
            }



            object[] objs = this.facade.QueryOnshelvesDetail(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtCartonNoEdit.Text)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtLocationNO.Text))
                );

            List <string> stnos = new List <string>();

            if (objs != null && objs.Length > 0)
            {
                foreach (Asndetailexp o in objs)
                {
                    if (!stnos.Contains(o.Stno))
                    {
                        stnos.Add(o.Stno);
                    }
                }
            }

            BenQGuru.eMES.Domain.IQC.AsnIQC[] iqcs = facade.GetASNIQCFromASN(stnos);
            List <string> IQCNos = new List <string>();

            foreach (BenQGuru.eMES.Domain.IQC.AsnIQC iqc in iqcs)
            {
                if (iqc.IqcType == "SpotCheck")
                {
                    IQCNos.Add(iqc.IqcNo);
                }
            }
            BenQGuru.eMES.Domain.IQC.AsnIQCDetailEc[] ECs = facade.GetIQCECFromIQCNo(IQCNos);
            List <object> passObjs = new List <object>();

            if (objs != null && objs.Length > 0)
            {
                foreach (Asndetailexp o in objs)
                {
                    bool isOk = true;
                    foreach (BenQGuru.eMES.Domain.IQC.AsnIQCDetailEc ec in ECs)
                    {
                        if (ec.StNo == o.Stno)
                        {
                            isOk = false;
                        }
                    }
                    if (isOk)
                    {
                        passObjs.Add(o);
                    }
                }
            }
            return(passObjs.Count);
        }
Example #10
0
        protected override DataRow GetGridRow(object obj)
        {
            if (facade == null)
            {
                facade = new WarehouseFacade(base.DataProvider);
            }
            DataRow             row = this.DtSource.NewRow();
            IQCExecSummaryBuyer s   = (IQCExecSummaryBuyer)obj;

            row["DQMCODE"]    = s.DQMCODE;
            row["DQMDESC"]    = s.MDESC;
            row["VENDORCODE"] = s.VENDORCODE;
            row["VENDORNAME"] = s.VENDORNAME;
            row["RQTY"]       = s.QTY;
            row["SAMPLESIZE"] = s.SAMPLESIZE;
            row["NGQTY"]      = s.NGQTY;

            row["NGPER"]     = s.NGPER;
            row["ReturnQTY"] = s.ReturnQTY;
            row["ReformQTY"] = s.ReformQTY;
            row["GiveQTY"]   = s.GiveQTY;
            row["AcceptQTY"] = s.AcceptQTY;



            return(row);
        }
Example #11
0
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     object[] objs = this._facade.QueryWarehouseStock(
         FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWarehouseCodeQuery.Text)), /*this.drpSegmentCodeQuery.SelectedValue,*/ this.drpFactoryCodeQuery.SelectedValue,
         inclusive, exclusive);
     if (objs != null && objs.Length > 0)
     {
         //čÆ»å–ę‰€ęœ‰ē‰©ę–™
         object[] objitem = this._facade.GetAllWarehouseItem();
         if (objitem != null)
         {
             for (int i = 0; i < objitem.Length; i++)
             {
                 WarehouseItem item = (WarehouseItem)objitem[i];
                 htItems.Add(item.ItemCode, item.ItemName);
                 item = null;
             }
         }
         objitem = null;
     }
     return(objs);
 }
Example #12
0
        private void SaveDocmentsNo(string newKzCode, string userCode)
        {
            DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(this.DataProvider);

            _WarehouseFacade = new WarehouseFacade(DataProvider);

            SERIALBOOK serialbook = new SERIALBOOK();

            serialbook.SNPrefix  = newKzCode.Substring(0, 7);
            serialbook.MaxSerial = newKzCode.Substring(7, 3);
            serialbook.MDate     = dbDateTime.DBDate;                              //å½“å‰ę—„ęœŸ
            serialbook.MTime     = dbDateTime.DBTime;                              //å½“å‰ę—¶é—“
            serialbook.MUser     = userCode;                                       //ē»“ꊤäŗŗ=ē™»å½•ē”Øꈷ

            string oldserial = _WarehouseFacade.GetMaxSerial(serialbook.SNPrefix); //通čæ‡å‰ē¼€čŽ·å–굁갓号

            if (oldserial == "")
            {
                _WarehouseFacade.AddSerialBook(serialbook);//ę–°å¢žåˆ°serialbookč”Ø
            }
            else
            {
                _WarehouseFacade.UpdateSerialBook(serialbook);//ę›“ę–°åˆ°serialbookč”Ø
            }
        }
Example #13
0
        public string CancelDownCommand(string[] asns)
        {
            try
            {
                InventoryFacade facade = new InventoryFacade(DataProvider);
                WarehouseFacade _wa    = new WarehouseFacade(DataProvider);

                foreach (string asn in asns)
                {
                    if (!facade.CheckASNDetailsStatus(asn))
                    {
                        return(asn + "č”Œé”¹ē›®å·²ē»å…ØéƒØåˆę£€å®Œęˆäøčƒ½å–ę¶ˆäø‹å‘");
                    }
                }
                DataProvider.BeginTransaction();

                _wa.UpdateASNForCancelDown(asns, "Release");
                foreach (string asn in asns)
                {
                    facade.UpdateASNDetail(asn, ASNHeadStatus.Release);
                    facade.UpdateASNDetailItem(asn);
                }
                DataProvider.CommitTransaction();
                return("å–ę¶ˆäø‹å‘ęˆåŠŸļ¼");
            }
            catch (Exception ex)
            {
                DataProvider.RollbackTransaction();
                throw ex;
            }
        }
Example #14
0
        public string CreateAutoDocmentsNo()
        {
            //DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(this.DataProvider);
            DBDateTime      dbTime           = FormatHelper.GetNowDBDateTime(this.DataProvider);
            string          stno             = dbTime.DBDate.ToString().Substring(2, 6);
            WarehouseFacade _WarehouseFacade = new WarehouseFacade(DataProvider);
            string          prefix           = "M" + stno;
            string          maxserial        = _WarehouseFacade.GetMaxSerial(prefix);//通čæ‡å‰ē¼€čŽ·å–ęœ€å¤§ęµę°“号

            //å¦‚ęžœå·²ę˜Æęœ€å¤§å€¼å°±čæ”回äøŗē©ŗ
            if (maxserial == "999")
            {
                return("");
            }

            SERIALBOOK serialbook = new SERIALBOOK();

            if (maxserial == "")
            {
                serialbook.SNPrefix  = prefix; /// åŗåˆ—号前ē¼€ ē‰©ę–™ä»£ē 
                serialbook.MaxSerial = "001";  /// åŗåˆ—å·ęœ€å¤§Serial号ē 

                //åŗåˆ—号(3位)
                return(prefix + string.Format("{0:000}", int.Parse(serialbook.MaxSerial)));
            }
            else
            {
                serialbook.SNPrefix  = prefix;
                serialbook.MaxSerial = (int.Parse(maxserial) + 1).ToString();
                //åŗåˆ—号(3位)
                return(prefix + string.Format("{0:000}", int.Parse(serialbook.MaxSerial)));
            }
        }
Example #15
0
        protected override DataRow GetGridRow(object obj)
        {
            if (_WarehouseFacade == null)
            {
                _WarehouseFacade = new WarehouseFacade(base.DataProvider);
            }
            DataRow row = this.DtSource.NewRow();

            row["ASN"]           = ((ASN)obj).StNo;
            row["CDate"]         = FormatHelper.ToDateString(((ASN)obj).CDate);
            row["CUser"]         = ((ASN)obj).CUser;
            row["StorageInType"] = this.GetInvInName(((ASN)obj).StType);
            row["SAPInvNo"]      = ((ASN)obj).InvNo;
            row["Status"]        = languageComponent1.GetString(((ASN)obj).Status);

            row["StorageInCode"] = ((ASN)obj).StorageCode;
            row["PredictDate"]   = FormatHelper.ToDateString(((ASN)obj).PreictDate);
            row["DirectFlag"]    = ((ASN)obj).DirectFlag;
            row["PickNo"]        = ((ASN)obj).PickNo;
            row["VendorCode"]    = ((ASN)obj).VendorCode;
            row["ExigencyFlag"]  = ((ASN)obj).ExigencyFlag;
            row["RejectsFlag"]   = ((ASN)obj).RejectsFlag;
            row["OANo"]          = ((ASN)obj).OANo;
            row["PackingListNo"] = ((ASN)obj).PackingListNo;
            row["ProvideDate"]   = ((ASN)obj).ProvideDate;// FormatHelper.ToDateString(((ASN)obj).ProvideDate);
            row["GrossWeight"]   = ((ASN)obj).GrossWeight;
            row["Volume"]        = ((ASN)obj).Volume;


            row["FromStorageCode"] = ((ASN)obj).FromStorageCode;
            row["Remark1"]         = ((ASN)obj).Remark1;

            return(row);
        }
        public DataTable GetDataGrid(string CartonNo, string LocationNo)
        {
            WarehouseFacade facade = null;

            if (facade == null)
            {
                facade = new WarehouseFacade(DataProvider);
            }
            object[] objs = facade.QueryOnshelvesDetail(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(CartonNo.ToUpper())), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(LocationNo.ToUpper())));

            DataTable dt = new DataTable("ExampleDataTable");

            if (objs != null)
            {
                dt.Columns.Add("Check", typeof(string));
                dt.Columns.Add("STNO", typeof(string));
                dt.Columns.Add("cartonno", typeof(string));
                dt.Columns.Add("relocaNo", typeof(string));
                dt.Columns.Add("locaNo", typeof(string));
                dt.Columns.Add("DQMCode", typeof(string));
                dt.Columns.Add("stline", typeof(string));
                for (int i = 0; i < objs.Length; i++)
                {
                    Asndetailexp Asndetail = objs[i] as Asndetailexp;
                    dt.Rows.Add("", Asndetail.Stno, Asndetail.Cartonno, Asndetail.ReLocationCode, Asndetail.LocationCode, Asndetail.DqmCode, Asndetail.Stline.ToString());
                }
            }
            return(dt);
        }
Example #17
0
        private void Print()
        {
            if (_WarehouseFacade == null)
            {
                _WarehouseFacade = new WarehouseFacade(base.DataProvider);
            }
            if (this.gridWebGrid.Rows.Count <= 0)
            {
                return;
            }
            try
            {
                this.DataProvider.BeginTransaction();

                for (int i = 0; i < this.gridWebGrid.Rows.Count; i++)
                {
                    string  barno = this.gridWebGrid.Rows[i].Items.FindItemByKey("TDCartonNo").Value.ToString();
                    BarCode bar   = (BarCode)_WarehouseFacade.GetBarCode(barno);
                    bar.PrintTimes = bar.PrintTimes + 1;
                    _WarehouseFacade.UpdateBarCode(bar);
                }
                this.DataProvider.CommitTransaction();
            }
            catch (Exception ex)
            {
                this.DataProvider.RollbackTransaction();
                WebInfoPublish.PublishInfo(this, ex.Message, this.languageComponent1);
            }
        }
Example #18
0
        private void DisplayTicketData()
        {
            if (_facade == null)
            {
                _facade = new WarehouseFacade(base.DataProvider);
            }
            string strTicketNo = this.GetRequestParam("ticketno");
            object obj         = this._facade.GetWarehouseTicket(strTicketNo);

            if (obj == null)
            {
                return;
            }
            WarehouseTicket tkt = (WarehouseTicket)obj;

            this.txtTicketNoQuery.Text    = tkt.TicketNo;
            this.txtTicketUserQuery.Text  = tkt.TicketUser;
            this.txtTicketDateQuery.Text  = FormatHelper.ToDateString(tkt.TicketDate);
            this.txtFactoryFromQuery.Text = tkt.FactoryCode;
            //this.txtSegmentFromQuery.Text = tkt.SegmentCode;
            this.txtWarehouseFromQuery.Text = tkt.WarehouseCode;
            this.txtFactoryToQuery.Text     = tkt.TOFactoryCode;
            //this.txtSegmentToQuery.Text = tkt.TOSegmentCode;
            this.txtWarehouseToQuery.Text = tkt.TOWarehouseCode;

            obj = this._facade.GetTransactionType(tkt.TransactionTypeCode);
            this.txtTransTypeQuery.Text = ((TransactionType)obj).TransactionTypeName;
            obj = null;
            tkt = null;

            this.cmdQuery_Click(null, null);
        }
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new DateCheck(lblDateQuery, DateEdit.Text, true));
            manager.Add(new LengthCheck(lblShiftCodeEdit, txtShiftCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblCrewCodeEdit, txtCrewCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblFACCodeEdit, txtFACCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblFirstClassGroup, drpFirstClassEdit, 40, true));
            manager.Add(new DecimalCheck(lblDurationEdit, txtDurationEdit, 0, 9999999999, true));
            manager.Add(new NumberCheck(lblManCountEdit, txtManCountEdit, 0, 9999999999, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            if (Convert.ToDecimal(this.txtDurationEdit.Text.Trim()) <= 0)
            {
                WebInfoPublish.Publish(this, "$Duration_Must_Over_Zero", this.languageComponent1);
                return(false);
            }

            if (Convert.ToDecimal(this.txtManCountEdit.Text.Trim()) <= 0)
            {
                WebInfoPublish.Publish(this, "$ManCount_Must_Over_Zero", this.languageComponent1);
                return(false);
            }

            ShiftModelFacade shiftModelFacade = new ShiftModelFacade(this.DataProvider);
            object           shiftObject      = shiftModelFacade.GetShift(FormatHelper.CleanString(this.txtShiftCodeEdit.Text.ToUpper()));

            if (shiftObject == null)
            {
                WebInfoPublish.Publish(this, "$Error_Shift_Not_Exist", this.languageComponent1);
                return(false);
            }

            ShiftModel shiftModel = new ShiftModel(this.DataProvider);
            object     crewObject = shiftModel.GetShiftCrew(FormatHelper.CleanString(this.txtCrewCodeEdit.Text.ToUpper()));

            if (crewObject == null)
            {
                WebInfoPublish.Publish(this, "$Error_ShiftCrew_Not_Exist", this.languageComponent1);
                return(false);
            }

            WarehouseFacade warehouseFacade = new WarehouseFacade(this.DataProvider);
            object          facObject       = warehouseFacade.GetFactory(FormatHelper.CleanString(this.txtFACCodeEdit.Text.ToUpper()));

            if (facObject == null)
            {
                WebInfoPublish.Publish(this, "$Error_FACCODE_Not_Exist", this.languageComponent1);
                return(false);
            }

            return(true);
        }
Example #20
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     return(this._facade.QueryWarehouseStockCount(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWarehouseCodeQuery.Text)), /*this.drpSegmentCodeQuery.SelectedValue,*/ this.drpFactoryCodeQuery.SelectedValue));
 }
Example #21
0
 protected override void AddDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     this._facade.AddFactory((Factory)domainObject);
 }
Example #22
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_WarehouseFacade == null)
     {
         _WarehouseFacade = new WarehouseFacade(base.DataProvider);
     }
     this._WarehouseFacade.DeletePickdetailmaterial((Pickdetailmaterial[])domainObjects.ToArray(typeof(Pickdetailmaterial)));
 }
Example #23
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     return(this._facade.QueryWarehouseCount(this.drpWarehouseCodeQuery.SelectedValue, this.drpFactoryCodeQuery.SelectedValue));
 }
Example #24
0
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     return(this._facade.GetItemKeyWaste(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), inclusive, exclusive));
 }
Example #25
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     return(this._facade.QueryFactoryCount(string.Empty));
 }
Example #26
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     return(this._facade.GetMOStockInQueryCount(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOCodeQuery.Text))));
 }
Example #27
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     return(this._facade.QueryWarehouseTicketDetailCount(string.Empty, this.GetRequestParam("ticketno")));
 }
Example #28
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     this._facade.DeleteWarehouse((Warehouse[])domainObjects.ToArray(typeof(Warehouse)));
 }
Example #29
0
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     this._facade.UpdateWarehouse((Warehouse)domainObject);
 }
Example #30
0
 protected override void AddDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new WarehouseFacade(base.DataProvider);
     }
     this._facade.AddWarehouse((Warehouse)domainObject);
     InitWarehouseCodeQueryList();
 }