protected void cmdStorageCheckClose_ServerClick(object sender, EventArgs e) { if (_WarehouseFacade == null) { _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } BenQGuru.eMES.Material.StockCheckDetailOp[] ops = this._WarehouseFacade.GetPortionStockCheckOpsNoPager(txtStockCheckCodeQuery.Text); foreach (BenQGuru.eMES.Material.StockCheckDetailOp op in ops) { if (op.STORAGEQTY != op.Qty) { if (string.IsNullOrEmpty(op.DiffDesc)) { WebInfoPublish.Publish(this, "存在数量不一致请填写盘点差异原因!", this.languageComponent1); return; } } } BenQGuru.eMES.Domain.Warehouse.StockCheck s = (BenQGuru.eMES.Domain.Warehouse.StockCheck)_WarehouseFacade.GetStockCheck(txtStockCheckCodeQuery.Text); s.STATUS = "Close"; _WarehouseFacade.UpdateStockCheck(s); WebInfoPublish.Publish(this, "盘点关闭成功!", this.languageComponent1); return; this.txtStockCheckCodeEdit.Text = string.Empty; txtDQMCODEEdit.Text = string.Empty; txtStorageCodeEdit.Text = string.Empty; txtLocationCodeEdit.Text = string.Empty; txtLocationCodeEdit.Text = string.Empty; txtCARTONNOEdit.Text = string.Empty; txtCheckQtyEdit.Text = string.Empty; txtDiffDescEdit.Text = string.Empty; }
protected void cmdAdd_ServerClick(object sender, EventArgs e) { if (_WarehouseFacade == null) { _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } string message = string.Empty; ShareLib.ShareKit kit = new ShareLib.ShareKit(); bool result = kit.SubmitPortionCheck(txtStockCheckCodeQuery.Text, txtCARTONNOEdit.Text, txtCheckQtyEdit.Text, txtLocationCodeEdit.Text, txtDiffDescEdit.Text, txtDQMCODEEdit.Text, base.DataProvider, GetUserCode(), out message); if (!result) { WebInfoPublish.Publish(this, message, this.languageComponent1); return; } this.txtStockCheckCodeEdit.Text = string.Empty; txtDQMCODEEdit.Text = string.Empty; txtStorageCodeEdit.Text = string.Empty; txtsLocationCodeEdit.Text = string.Empty; txtLocationCodeEdit.Text = string.Empty; txtCARTONNOEdit.Text = string.Empty; txtCheckQtyEdit.Text = string.Empty; txtDiffDescEdit.Text = string.Empty; WebInfoPublish.Publish(this, "提交成功!", this.languageComponent1); this.cmdQuery_Click(null, null); }
protected void cmdImport_ServerClick(object sender, System.EventArgs e) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } if (items == null) { items = GetAllItem(); if (items == null) { return; } } int iRet = this._facade.ImportWarehouseCycleCountDetail(items, this.GetUserCode()); string strMessage = ""; if (iRet > 0) { strMessage = languageComponent1.GetLanguage("$CycleImport_Success").ControlText; this.cmdEnter.Disabled = true; } else { strMessage = languageComponent1.GetLanguage("$CycleImport_Error").ControlText; } string alertInfo = string.Format("<script language=javascript>alert('{0}');</script>", strMessage); if (!this.IsClientScriptBlockRegistered("ImportAlert")) { this.RegisterClientScriptBlock("ImportAlert", alertInfo); } items = null; }
public DataTable GetPortionStockCheckOps(string checkNo) { BenQGuru.eMES.Material.WarehouseFacade facade = null; if (facade == null) { facade = new BenQGuru.eMES.Material.WarehouseFacade(DataProvider); } object[] objs = facade.GetPortionStockCheckOps(checkNo); DataTable dt = new DataTable("ExampleDataTable"); dt.Columns.Add("SLocationCode", typeof(string)); dt.Columns.Add("SCartonno", typeof(string)); dt.Columns.Add("LocationCode", typeof(string)); dt.Columns.Add("Cartonno", typeof(string)); dt.Columns.Add("StorageQTY", typeof(string)); dt.Columns.Add("CheckQTY", typeof(string)); dt.Columns.Add("StorageCode", typeof(string)); dt.Columns.Add("DQMCode", typeof(string)); if (objs != null) { for (int i = 0; i < objs.Length; i++) { StockCheckDetailOp s = objs[i] as StockCheckDetailOp; dt.Rows.Add(s.SLocationCode, s.SCARTONNO, s.LocationCode, s.CARTONNO, s.STORAGEQTY, s.Qty, s.StorageCode, s.DQMCODE); } } return(dt); }
protected void drpFactoryCodeEdit_SelectedIndexChanged(object sender, System.EventArgs e) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } object[] objs; if (this.drpFactoryCodeEdit.SelectedValue != string.Empty) { objs = this._facade.QueryWarehouse(string.Empty, /*this.txtSegmentCodeQuery.Text,*/ this.drpFactoryCodeEdit.SelectedValue, 1, int.MaxValue); } else { objs = this._facade.GetAllDistinctWarehouse(); } this.drpWarehouseCodeEdit.Items.Clear(); if (objs == null) { return; } foreach (object obj in objs) { this.drpWarehouseCodeEdit.Items.Add(((Warehouse)obj).WarehouseCode); } objs = null; }
private bool IsByMOControl() { if (this.drpTransTypeEdit.SelectedValue == string.Empty) { return(false); } if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } string transtypecode = this.drpTransTypeEdit.SelectedValue.Substring(0, this.drpTransTypeEdit.SelectedValue.LastIndexOf(":")); TransactionType tranceTypeObj = (TransactionType)this._facade.GetTransactionType(transtypecode); if (tranceTypeObj != null && (FormatHelper.StringToBoolean(((TransactionType)tranceTypeObj).IsByMOControl) == true)) { return(true); } // if(transtypecode == "541" || transtypecode == "551" || transtypecode == "262" || transtypecode == "801" ) // { // return true; // } return(false); }
protected override object GetEditObject() { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } WarehouseTicket ticket = this._facade.CreateNewWarehouseTicket(); ticket.TicketNo = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtTransCodeEdit.Text, 50)); string str = this.drpTransTypeEdit.SelectedValue; str = str.Substring(0, str.LastIndexOf(":")); ticket.TransactionTypeCode = str; ticket.MOCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOCodeEdit.Text)); ticket.FactoryCode = this.drpFactoryFromEdit.SelectedValue; //ticket.SegmentCode = this.drpSegFromEdit.SelectedValue; ticket.WarehouseCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWHFromEdit.Text)); ticket.TOFactoryCode = this.drpFactoryToEdit.SelectedValue; //ticket.TOSegmentCode = this.drpSegToEdit.SelectedValue; ticket.TOWarehouseCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpWHToEdit.Text)); ticket.MaintainUser = this.GetUserCode(); ticket.ReferenceCode = this.txtRefCodeEdit.Text; return(ticket); }
private bool IsSendItem() { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } object obj = this._facade.GetWarehouseTicket(this.txtTicketNoQuery.Text); if (obj == null) { return(false); } WarehouseTicket tkt = (WarehouseTicket)obj; string strPath = this.MapPath("TransTypeMoStock.xml"); System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); doc.Load(strPath); System.Xml.XmlElement eleDoc = doc.DocumentElement; System.Xml.XmlNode elemap = eleDoc.SelectSingleNode("//TransTypeMapping/SendItem"); string strCode = ""; if (elemap != null && elemap.Attributes["Code"] != null) { strCode = elemap.Attributes["Code"].Value; } if (tkt.TransactionTypeCode == strCode) { return(true); } else { return(false); } }
private void gridWebGrid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e) { string ticketno = e.Cell.Row.Cells.FromKey("TransactionCode").Text; string mocode = e.Cell.Row.Cells.FromKey("MOCode").Text; if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } if (this.gridHelper.IsClickColumn("SelectItem", e)) { //this.Response.Redirect( this.MakeRedirectUrl("./FTrans2ItemSP.aspx", new string[]{"ticketno"}, new string[]{e.Cell.Row.Cells[1].Text.Trim()})); this.Response.Redirect(this.MakeRedirectUrl("./FTrans2ItemSP.aspx", new string[] { "ticketno", "mocode" }, new string[] { ticketno, mocode })); } if (this.gridHelper.IsClickColumn("Transaction", e)) { if (this._facade.QueryWarehouseTicketDetailCount(string.Empty, e.Cell.Row.Cells[1].Text.Trim()) > 0) { this.Response.Redirect(this.MakeRedirectUrl("./FTrans2ActualTransSP.aspx", new string[] { "ticketno" }, new string[] { e.Cell.Row.Cells[1].Text.Trim() })); } else { throw new Exception("$Error_DoWarehouseTransaction_WithoutWarehouseItem"); } } }
protected override void DeleteDomainObjects(ArrayList domainObjects) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } this._facade.DeleteWarehouse2StepSequence((Warehouse2StepSequence[])domainObjects.ToArray(typeof(Warehouse2StepSequence))); }
protected override int GetRowCount() { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } return(this._facade.QueryWarehouse2StepSequenceBySSCount(this.GetRequestParam("sscode"))); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } return(this._facade.QueryWarehouse2StepSequenceBySS(this.GetRequestParam("sscode"), inclusive, exclusive)); }
protected override void DeleteDomainObjects(ArrayList domainObjects) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } this._facade.DeleteWarehouseTicket((WarehouseTicket[])domainObjects.ToArray(typeof(WarehouseTicket)), this.GetUserCode()); }
protected override void AddDomainObject(object domainObject) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } this._facade.AddWarehouseTicket((WarehouseTicket)domainObject); }
protected override void UpdateDomainObject(object domainObject) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } this._facade.UpdateWarehouse2StepSequence((Warehouse2StepSequence)domainObject); }
protected override int GetRowCount() { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } return(_facade.QueryWarehouseCountDetailCount(this.FactoryCode, this.WarehouseCode, this.WarehouseItemCode)); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } return(_facade.QueryWarehouseCountDetail(this.FactoryCode, this.WarehouseCode, this.WarehouseItemCode, inclusive, exclusive)); }
protected override void UpdateDomainObject(object domainObject) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } this._facade.UpdateTransactionType((TransactionType)domainObject); }
protected override void DeleteDomainObjects(ArrayList domainObjects) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } this._facade.DeleteTransactionType((TransactionType[])domainObjects.ToArray(typeof(TransactionType))); }
protected override int GetRowCount() { if (_WarehouseFacade == null) { _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } return(_WarehouseFacade.GetStockCheckDetailsCount(txtStockCheckCodeQuery.Text, txtStorageCodeQuery.Text, txtDQMCODEQuery.Text)); }
protected override void UpdateDomainObject(object domainObject) { if (_facade == null) { _facade = new WarehouseFacade(base.DataProvider); } this._facade.UpdateWarehouseTicketDetail((WarehouseTicketDetail)domainObject); }
protected override int GetRowCount() { if (_facade == null) { _facade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } return(this._facade.GetAvailableMOCount(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(txtMOCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(txtItemCodeQuery.Text)))); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { if (_WarehouseFacade == null) { _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } return(_WarehouseFacade.GetStockCheckDetails(txtStockCheckCodeQuery.Text, txtStorageCodeQuery.Text, txtDQMCODEQuery.Text, inclusive, exclusive)); }
protected override int GetRowCount() { if (_WarehouseFacade == null) { _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } return(this._WarehouseFacade.GetPortionStockCheckOpsCount(txtStockCheckCodeQuery.Text)); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { if (_facade == null) { _facade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } return(this._facade.GetAvailableMO(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(txtMOCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(txtItemCodeQuery.Text)), inclusive, exclusive)); }
//protected override void gridWebGrid_ItemCommand(GridRecord row, string commandName) //{ // if (commandName == "Edit") // { // object obj = this.GetEditObject(row); // if (obj != null) // { // this.SetEditObject(obj); // this.buttonHelper.PageActionStatusHandle(PageActionType.Update); // } // } // else if (commandName == "LinkDetail") // { // string pickNo = row.Items.FindItemByKey("PickNo").Text.Trim(); // //string storageOut = row.Items.FindItemByKey("StorageOut").Text.Trim(); // Response.Redirect(this.MakeRedirectUrl("FCreatePickLineMP.aspx", new string[] { "ACT", "PickNo" }, new string[] { "LinkDetail", pickNo })); // } //} protected override void cmdExport_Click(object sender, EventArgs e) { BenQGuru.eMES.Material.WarehouseFacade _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); List <string> ca = new List <string>(); XlsPackage xls = new XlsPackage(); IFont font = xls.Black; font.FontHeightInPoints = 10; ICellStyle style = xls.Normal; style.SetFont(font); xls.CreateSheet("盘点统计表"); xls.NewRow(0); xls.Cell(0, "库位", style); xls.Cell(1, "盘点次数", style); xls.Cell(2, "盘点准确率", style); int rowNum = 1; for (int i = 0; i < this.gridWebGrid.Rows.Count; i++) { xls.NewRow(rowNum); string STORAGECODE = this.gridWebGrid.Rows[i].Items.FindItemByKey("STORAGECODE").Text; xls.Cell(0, STORAGECODE, style); string CHECKCOUNT = this.gridWebGrid.Rows[i].Items.FindItemByKey("CHECKCOUNT").Text; xls.Cell(1, CHECKCOUNT, style); string PASSREAT = this.gridWebGrid.Rows[i].Items.FindItemByKey("PASSREAT").Text; xls.Cell(2, PASSREAT, style); rowNum++; } string filename = string.Format("Export_{0}_{1}.{2}", FormatHelper.TODateInt(System.DateTime.Now).ToString(), FormatHelper.TOTimeInt(System.DateTime.Now).ToString(), "xls"); string filepath = string.Format(@"{0}{1}", this.DownloadPhysicalPath, filename); FileStream file = new FileStream(filepath, FileMode.Create, FileAccess.ReadWrite); xls.Save(file); file.Close(); DownLoadFile1(filename); }
public string[] GetPortionStockChecks() { BenQGuru.eMES.Material.WarehouseFacade facade = null; if (facade == null) { facade = new BenQGuru.eMES.Material.WarehouseFacade(DataProvider); } return(facade.GetPortionStockChecks().ToArray()); }
public void AddStockCheckDetailCarton(string checkNo, string storageCode, string locationCode, string CARTONNO, string DQMCode, int checkQty, string userCode, string SLocationCode, string SCARTONNO) { BenQGuru.eMES.Material.WarehouseFacade facade = null; if (facade == null) { facade = new BenQGuru.eMES.Material.WarehouseFacade(DataProvider); } facade.AddStockCheckDetailCarton(checkNo, storageCode, locationCode, CARTONNO, DQMCode, checkQty, userCode, SLocationCode, SCARTONNO); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { if (_WarehouseFacade == null) { _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider); } return(this._WarehouseFacade.GetPortionStockCheckOps(txtStockCheckCodeQuery.Text, inclusive, exclusive)); }
public BenQGuru.eMES.Domain.Warehouse.StockCheckDetail GetPortionStockCheckFromCheckNo(string checkNo) { BenQGuru.eMES.Material.WarehouseFacade facade = null; if (facade == null) { facade = new BenQGuru.eMES.Material.WarehouseFacade(DataProvider); } return(facade.GetPortionStockChecksFormCheckNo(checkNo)); }