protected override object GetEditObject() { //this.ValidateInput(); if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } IQCHead iqcHead = this._facade.CreateNewIQCHead(); iqcHead.IQCNo = FormatHelper.CleanString(this.txtIQCNoEdit.Text, 50); iqcHead.STNo = FormatHelper.CleanString(this.txtASNNoEdit.Text, 40); iqcHead.ROHS = this.lblROHSEdit.Checked.ToString().ToUpper(); iqcHead.InventoryUser = FormatHelper.CleanString(this.txtInvUserEdit.Text, 100); iqcHead.Applicant = FormatHelper.CleanString(this.txtApplicantEdit.Text, 100); iqcHead.Inspector = FormatHelper.CleanString(this.txtInspectorEdit.Text, 100); iqcHead.LotNo = FormatHelper.CleanString(this.txtLotNoEdit.Text, 100); iqcHead.InspectDate = FormatHelper.TODateInt(this.dateInspectDateEdit.Text); iqcHead.ProduceDate = FormatHelper.TODateInt(this.dateProductDateEdit.Text); iqcHead.Standard = FormatHelper.CleanString(this.txtStandardEdit.Text, 100); iqcHead.Method = FormatHelper.CleanString(this.txtMethodEdit.Text, 100); iqcHead.Result = FormatHelper.CleanString(this.txtResultEdit.Text, 100); iqcHead.ReceiveDate = FormatHelper.TODateInt(this.dateReceiveDateEdit.Text); iqcHead.PIC = FormatHelper.CleanString(this.txtPICEdit.Text, 100); iqcHead.Status = this.txtStatus.Text; return(iqcHead); }
protected override void UpdateDomainObject(object domainObject) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } this._facade.UpdateIQCDetail((IQCDetail)domainObject); }
protected override void DeleteDomainObjects(ArrayList domainObjects) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } this._facade.DeleteIQCHead((IQCHead[])domainObjects.ToArray(typeof(IQCHead))); }
protected override int GetRowCount() { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } return(this._facade.QueryIQCDetailCount(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtIQCNo.Text)))); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } return(this._facade.QueryIQCDetail(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtIQCNo.Text)), inclusive, exclusive)); }
protected override void UpdateDomainObject(object domainObject) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } if (((IQCHead)domainObject).Status.ToUpper().Equals("CLOSE")) { WebInfoPublish.Publish(this, "$CanNotModifyForClosed", this.languageComponent1); return; } this._facade.UpdateIQCHead((IQCHead)domainObject); }
protected override void DeleteDomainObjects(ArrayList domainObjects) { if (this.txtIQCStatus.Text == "Close") { WebInfoPublish.Publish(this, "$CannotEditClosed", this.languageComponent1); return; } if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } this._facade.DeleteIQCDetail((IQCDetail[])domainObjects.ToArray(typeof(IQCDetail))); }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } object obj = _facade.GetIQCHead(row.Cells[1].Text.ToString()); if (obj != null) { return((IQCHead)obj); } return(null); }
protected override int GetRowCount() { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } return(this._facade.QueryIQCHeadCount(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtIQCNoQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtASNNoQuery.Text)), this.lblStatusWaitCheckQuery.Checked, this.lblStatusWaitCheckQuery.Checked, this.lblROHSQuery.Checked, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtVendorCodeQuery.Text)), FormatHelper.TODateInt(FormatHelper.CleanString(this.dateAppDateFromQuery.Text)).ToString(), FormatHelper.TODateInt(FormatHelper.CleanString(this.dateAppDateToQuery.Text)).ToString())); }
protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } object obj = _facade.GetIQCDetail(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtIQCNo.Text)), row.Cells[1].Text.ToString()); if (obj != null) { return((IQCDetail)obj); } return(null); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } return(this._facade.QueryIQCHead(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtIQCNoQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtASNNoQuery.Text)), this.lblStatusWaitCheckQuery.Checked, this.lblStatusClosedQuery.Checked, this.lblROHSQuery.Checked, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtVendorCodeQuery.Text)), FormatHelper.TODateInt(FormatHelper.CleanString(this.dateAppDateFromQuery.Text)).ToString(), FormatHelper.TODateInt(FormatHelper.CleanString(this.dateAppDateToQuery.Text)).ToString(), inclusive, exclusive)); }
protected override void AddDomainObject(object domainObject) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } if (_facade.IsIQCHeadExist(((IQCHead)domainObject).IQCNo)) { WebInfoPublish.Publish(this, "$IQCExist", this.languageComponent1); return; } if (_facade.IsASNExist(((IQCHead)domainObject).STNo)) { WebInfoPublish.Publish(this, "$ASNExist", this.languageComponent1); return; } this._facade.AddIQCHead((IQCHead)domainObject, this.GetUserCode()); }
protected override void AddDomainObject(object domainObject) { if (this.txtIQCStatus.Text == "Close") { WebInfoPublish.Publish(this, "$CannotEditClosed", this.languageComponent1); return; } if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } if (_facade.IsIQCDetailExist(((IQCDetail)domainObject))) { WebInfoPublish.Publish(this, "$LineExist", this.languageComponent1); return; } this._facade.AddIQCDetail((IQCDetail)domainObject, this.GetUserCode()); }
protected void ButtonClose_Click(object sender, EventArgs e) { if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } if (!((IQCHead)_facade.GetIQCHead(((IQCHead)this.GetEditObject()).IQCNo)).Status.ToUpper().Equals("WAITCHECK")) { WebInfoPublish.Publish(this, "$OnlyCloseWaitCheck", this.languageComponent1); return; } if (_facade.IsIQCAvaliableToClose(((IQCHead)this.GetEditObject()).IQCNo)) { _facade.CloseIQC(((IQCHead)this.GetEditObject()).IQCNo); this.SetEditObject(null); } else { WebInfoPublish.Publish(this, "$OnlyCloseFinishedCheck", this.languageComponent1); } }
protected override object GetEditObject() { //this.ValidateInput(); if (_facade == null) { _facade = new InterfaceModelFacadeFactory(base.DataProvider).Create(); } IQCDetail iqcDetail = this._facade.CreateNewIQCDetail(); iqcDetail.STLine = int.Parse(FormatHelper.CleanString(this.txtIQCLineNo.Text, 6)); iqcDetail.ItemCode = FormatHelper.CleanString(this.txtItemNo.Text, 40); //iqcDetail.PlanDate = FormatHelper.TODateInt(this.datePlanDate.Text); //if (FormatHelper.CleanString(this.txtPlanQty.Text).Length != 0) //{ // iqcDetail.PlanQty = decimal.Parse(FormatHelper.CleanString(this.txtPlanQty.Text)); //} //else //{ // iqcDetail.PlanQty = 0; //} iqcDetail.Unit = FormatHelper.CleanString(this.txtUnit.Text, 40); iqcDetail.OrderNo = FormatHelper.CleanString(this.txtOrderNo.Text, 40); iqcDetail.OrderLine = int.Parse(FormatHelper.CleanString(this.txtOrderLine.Text, 22)); if (FormatHelper.CleanString(this.txtReceiveQty.Text).Length != 0) { iqcDetail.ReceiveQty = decimal.Parse(FormatHelper.CleanString(this.txtReceiveQty.Text)); } else { iqcDetail.ReceiveQty = 0; } if (this.lblStatusQualified.Checked) { iqcDetail.CheckStatus = "Qualified"; } if (this.lblStatusUnqualified.Checked) { iqcDetail.CheckStatus = "UnQualified"; } if (this.lblStatusWaitCheck.Checked) { iqcDetail.CheckStatus = "WaitCheck"; } if (FormatHelper.CleanString(this.txtSampleQty.Text).Length != 0) { iqcDetail.SampleQty = decimal.Parse(FormatHelper.CleanString(this.txtSampleQty.Text)); } else { iqcDetail.SampleQty = 0; } if (FormatHelper.CleanString(this.txtNGQty.Text).Length != 0) { iqcDetail.NGQty = decimal.Parse(FormatHelper.CleanString(this.txtNGQty.Text)); } else { iqcDetail.NGQty = 0; } iqcDetail.MemoEx = FormatHelper.CleanString(this.txtMemoEx.Text, 100); iqcDetail.Memo = FormatHelper.CleanString(this.txtMemo.Text, 100); iqcDetail.PIC = FormatHelper.CleanString(this.txtPIC.Text, 100); iqcDetail.Action = FormatHelper.CleanString(this.txtAction.Text, 100); iqcDetail.IQCNo = FormatHelper.CleanString(this.txtIQCNo.Text, 50); iqcDetail.STNo = FormatHelper.CleanString(this.txtASNNo.Text, 40); iqcDetail.Attribute = this.drpItemAttribute.SelectedValue; iqcDetail.STDStatus = this.txtSTDStatus.Text; return(iqcDetail); }