private void SaveParty() { var result = new PartyBLL().SaveParty(ExtractData(), Mode); if (result > 0) { PartyId = result; if (KYCUpload.HasFile) { var fileName = KYCUpload.FileName; var filext = fileName.Substring(fileName.LastIndexOf(".") + 1); if (filext.ToLower() != "pdf") { ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "<script>javascript:void alert('Only pdf file is accepted!');</script>", false); return; } var path = Server.MapPath("~/Forwarding/KYCUploads"); var newFileName = "KYC" + PartyId.ToString().TrimEnd(); // Guid.NewGuid().ToString(); if (!string.IsNullOrEmpty(path)) { path += @"\" + newFileName + System.IO.Path.GetExtension(fileName); hdnKYCPath.Value = path; KYCUpload.PostedFile.SaveAs(path); } } Response.Redirect("~/Forwarding/Master/ManageParties.aspx"); } else { GeneralFunctions.RegisterAlertScript(this, "Error Occured"); } }
private void GetProductList(string findAll) { try { base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data"); using (PartyBLL partyBll = new PartyBLL()) { this.lstProduct = partyBll.LOV_GetProductList(this._PARTY_ID, findAll); } if (this.lstProduct != null) { this.grdProductList.DataSource = this.lstProduct; } else { this.grdProductList.DataSource = null; } } catch (Exception ex) { base.FinishedProcessing(); XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } finally { base.FinishedProcessing(); } }
public void GetPartyList() { List <Party> lstParty = null; try { base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data"); using (PartyBLL partyBll = new PartyBLL()) { lstParty = partyBll.LovPratyList(this._PARTY_TYPE, string.Empty); } this.grdParty.DataSource = lstParty; } catch (Exception ex) { base.FinishedProcessing(); XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } finally { base.FinishedProcessing(); } }
private bool GetCustomerByCode(string custCode) { bool result = false; try { using (PartyBLL partyBll = new PartyBLL()) { Party party = partyBll.GetParty(custCode); if (party != null) { this.txtPARTY_NAME.Text = party.PARTY_NAME; this.txtSTD_QTY.Focus(); result = true; } } } catch (Exception ex) { //XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); result = false; } finally { } return(result); }
public void GetPartyList(string findAll) { List <Party> lstParty = null; try { base.ExecutionStart(); base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data"); using (PartyBLL partyBll = new PartyBLL()) { lstParty = partyBll.GetPartyList(findAll); } this.grdParty.DataSource = lstParty; this.dntParty.DataSource = lstParty; base.ExecutionStop(); } catch (Exception ex) { base.FinishedProcessing(); XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } finally { base.FinishedProcessing(); ((frmMainMenu)this.ParentForm).ExecuteTime.Caption = base.ExecuteTime; } }
private void InitializaLOVData() { try { //For Warehouse using (MaterialBLL mtlBll = new MaterialBLL()) { List <Location> lstLoc = mtlBll.GetLocationList(); if (lstLoc != null) { this.grvQrySummary_rps_lueLocation.DataSource = lstLoc; lstLoc.Insert(0, new Location { SEQ_NO = string.Empty, NAME = "(All)" }); this.lueLocation.Properties.DataSource = lstLoc; } } //for party using (PartyBLL partyBll = new PartyBLL()) { List <Party> lstParty = partyBll.LovPratyList("V", string.Empty); lstParty.Insert(0, new Party { PARTY_ID = string.Empty, PARTY_NAME = "(All)" }); this.lueCUSTOMER.Properties.DataSource = lstParty; } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
private void InitializaLOVData() { try { //for warehouse using (QueryBLL queryBll = new QueryBLL()) { List <Warehouse> lstWH = queryBll.GetWarehouse(); if (lstWH != null) { lstWH.Insert(0, new Warehouse { SEQ_NO = string.Empty, NAME = "(All)" }); this.lueWarehouse.Properties.DataSource = lstWH; this.rps_lueWH.DataSource = lstWH; } } //for party using (PartyBLL partyBll = new PartyBLL()) { List <Party> lstParty = partyBll.LovPratyList("C", string.Empty); lstParty.Insert(0, new Party { PARTY_ID = string.Empty, PARTY_NAME = "(All)" }); this.lueCUSTOMER.Properties.DataSource = lstParty; } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
private void InitializaLOVData() { try { //for warehouse //using (QueryBLL queryBll = new QueryBLL()) //{ // List<Warehouse> lstWH = queryBll.GetWarehouse(); // if (lstWH != null) // { // lstWH.Insert(0, new Warehouse { SEQ_NO = string.Empty, NAME = "(All)" }); // this.lueWarehouse.Properties.DataSource = lstWH; // this.rps_lueWH.DataSource = lstWH; // } //} using (MaterialBLL mtlBll = new MaterialBLL()) { List <Location> lstLoc = mtlBll.GetLocationList(); if (lstLoc != null) { // this.grvQrySummary_rps_lueLocation.DataSource = lstLoc; lstLoc.Insert(0, new Location { SEQ_NO = string.Empty, NAME = "(All)" }); this.lueWarehouse.Properties.DataSource = lstLoc; this.rps_lueWH.DataSource = lstLoc; } } //for ARR TYPE using (ArrivalBLL arrBll = new ArrivalBLL()) { List <M_ARRIVAL_TYPE> lstARR_TYPE = arrBll.GetArrivalTypeList(); if (lstARR_TYPE != null) { // lstWH.Insert(0, new Warehouse { SEQ_NO = string.Empty, NAME = "(All)" }); // this.lueWarehouse.Properties.DataSource = lstWH; this.rps_lueARR_TYPE.DataSource = lstARR_TYPE; } } //for party using (PartyBLL partyBll = new PartyBLL()) { List <Party> lstParty = partyBll.LovPratyList("V", string.Empty); lstParty.Insert(0, new Party { PARTY_ID = string.Empty, PARTY_NAME = "(All)" }); this.lueCUSTOMER.Properties.DataSource = lstParty; } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
private void LoadData(int id) { var src = new PartyBLL().GetParty(id, new SearchCriteria() { StringParams = new List <string>() { "0", "" } }); if (src != null && src.Count() > 0) { var party = src.FirstOrDefault(); txtEmailID.Text = party.emailID; txtContactPerson.Text = party.ContactPerson; txtAddress.Text = party.PartyAddress; txtFAX.Text = party.FAX; txtPAN.Text = party.PAN; txtPartyName.Text = party.PartyName; txtPhone.Text = party.Phone; txtMob.Text = party.Mobile; txtTAN.Text = party.TAN; txtFullName.Text = party.FullName; hdnKYCPath.Value = "KYC" + PartyId.ToString().TrimEnd(); //ddlLine.SelectedValue = party.fLineID.ToString(); ddlPartyType.SelectedValue = party.PartyType.ToString(); ddlGroup.SelectedValue = party.GroupID.ToString(); ddlPrincipal.SelectedValue = party.PrincipalID.ToString(); AutoCompleteCountry1.CountryId = party.CountryID.ToString(); AutoCompleteCountry1.CountryName = party.CountryName; var path = Server.MapPath("~/Forwarding/KYCUploads"); var newFileName = "KYC" + PartyId.ToString().TrimEnd(); // Guid.NewGuid().ToString(); if (!string.IsNullOrEmpty(path)) { path += @"\" + newFileName + ".pdf"; //System.IO.Path.GetExtension(fileName); hdnKYCPath.Value = path; if (File.Exists(path)) { lnkKYCUpload.Enabled = true; lnkKYCUpload.Text = newFileName + ".pdf"; //lblUploadedFileName.Text = newFileName; //lblUploadedFileName.Visible = true; } } } }
private void SaveGroup() { var result = new PartyBLL().SaveGroup(ExtractData(), Mode); if (result > 0) { PartyId = result; Response.Redirect("~/Forwarding/Master/ManageGroup.aspx"); } else { GeneralFunctions.RegisterAlertScript(this, "Error Occured"); } }
private void LoadData(int id) { var src = new PartyBLL().GetGroup(id, new SearchCriteria() { StringParams = new List <string>() { "0", "" } }); if (src != null && src.Count() > 0) { var party = src.FirstOrDefault(); txtAddress.Text = party.GroupAddress; txtPartyName.Text = party.GroupName; } }
public void GetPartyListSearchValue(string search) { List <Party> lstParty = null; try { using (PartyBLL partyBll = new PartyBLL()) { lstParty = partyBll.LovPratyList(this._PARTY_TYPE, search); } this.grdParty.DataSource = lstParty; } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
private void GetPartyProductList(string partyid) { try { using (PartyBLL partyBll = new PartyBLL()) { this.dtbPartyProduct = partyBll.GetProductList(partyid); } this.grdProductList.DataSource = this.dtbPartyProduct; GridView view = (GridView)this.grdProductList.Views[0]; UiUtility.RemoveActiveRow(view); } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
public void GetBindingParty(string partyID) { Party party = null; try { using (PartyBLL partyBll = new PartyBLL()) { party = partyBll.GetParty(partyID); } if (party != null) { this.txtPARTY_ID.Text = party.PARTY_ID; this.txtPARTY_NAME.Text = party.PARTY_NAME; this.icbPARTY_TYPE.EditValue = party.PARTY_TYPE; this.txtADD1.Text = party.ADD1; this.txtADD2.Text = party.ADD2; this.txtADD3.Text = party.ADD3; this.txtADD4.Text = party.ADD4; this.txtTEL.Text = party.TEL; this.txtFAX.Text = party.FAX; this.txtEMAIL.Text = party.EMAIL; this.txtPIC.Text = party.PIC; this.txtREMARK.Text = party.REMARK; this.icbREC_STAT.EditValue = party.REC_STAT; this.GetPartyProductList(party.PARTY_ID); } else { this.ClearDataOnScreen(); XtraMessageBox.Show(this, "No Data found.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
public void UpdatePartyProductList_Bulk() { string result = string.Empty; try { this.dtbPartyProduct.AcceptChanges(); using (PartyBLL partyBll = new PartyBLL()) { result = partyBll.UpdatePartyProduct(this.dtbPartyProduct, ((frmMainMenu)this.ParentForm).UserID); } if (!result.Equals("OK")) { throw new Exception("Exception when update party product!"); } } catch (Exception ex) { throw ex; } }
private void UploadPartyMaster() { try { string resultMsg = string.Empty; using (PartyBLL partyBll = new PartyBLL()) { if (this.PARTY_TYPE == "C") { resultMsg = partyBll.UploadCustomerMaster(this.dtCSVdata, this.PARTY_TYPE, this.USER_ID); } else if (this.PARTY_TYPE == "V") { resultMsg = partyBll.UploadVendorMaster(this.dtCSVdata, this.PARTY_TYPE, this.USER_ID); } else { resultMsg = "NOTHING UPDATE"; } } if (resultMsg == "OK") { NotifierResult.Show("Upload CSV Complete", "Result", 50, 1000, 50, NotifyType.Safe); } else { XtraMessageBox.Show(this, resultMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
private void InitializaLOVData() { try { using (ProductionTypeBLL pdtBll = new ProductionTypeBLL()) { List <ProductionType> lstProdType = pdtBll.GetProductionTypeList(); lstProdType.Insert(0, new ProductionType { SEQ_NO = string.Empty, NAME = "(All)" }); this.luePRODUCTION_TYPE.Properties.DataSource = lstProdType; } using (MachineBLL mcBll = new MachineBLL()) { List <Machine> lstMachine = mcBll.GetMachineList(string.Empty); lstMachine.Insert(0, new Machine { MC_NO = string.Empty, MACHINE_NAME = "(All)" }); this.lueMC_NO.Properties.DataSource = lstMachine; } using (PartyBLL partyBll = new PartyBLL()) { List <Party> lstParty = partyBll.LovPratyList("C", string.Empty); lstParty.Insert(0, new Party { PARTY_ID = string.Empty, PARTY_NAME = "(All)" }); this.lueCUSTOMER.Properties.DataSource = lstParty; } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
public void UpdateParty() { string result = string.Empty; Party party = null; try { this.Cursor = Cursors.WaitCursor; party = new Party(); party.PARTY_ID = this.txtPARTY_ID.Text; party.PARTY_NAME = this.txtPARTY_NAME.Text; party.PARTY_TYPE = (string)this.icbPARTY_TYPE.EditValue; party.ADD1 = this.txtADD1.Text; party.ADD2 = this.txtADD2.Text; party.ADD3 = this.txtADD3.Text; party.ADD4 = this.txtADD4.Text; party.TEL = this.txtTEL.Text; party.FAX = this.txtFAX.Text; party.EMAIL = this.txtEMAIL.Text; party.PIC = this.txtPIC.Text; party.REMARK = this.txtREMARK.Text; party.REC_STAT = (bool)this.icbREC_STAT.EditValue; using (PartyBLL partyBll = new PartyBLL()) { result = partyBll.UpdateParty(party, ((frmMainMenu)this.ParentForm).UserID); } if (result.Equals("OK")) { this.UpdatePartyProductList_Bulk(); GridView view = (GridView)this.grdParty.Views[0]; view.BeginDataUpdate(); view.SetFocusedRowCellValue("PARTY_ID", party.PARTY_ID); view.SetFocusedRowCellValue("PARTY_NAME", party.PARTY_NAME); view.SetFocusedRowCellValue("PARTY_TYPE", party.PARTY_TYPE); view.SetFocusedRowCellValue("TEL", party.TEL); view.SetFocusedRowCellValue("FAX", party.FAX); view.SetFocusedRowCellValue("EMAIL", party.EMAIL); view.SetFocusedRowCellValue("REC_STAT", party.REC_STAT); view.EndDataUpdate(); NotifierResult.Show("Update Complete", "Result", 50, 1000, 50, NotifyType.Safe); } else { NotifierResult.Show(result, "Error", 100, 1000, 0, NotifyType.Warning); } } catch (Exception ex) { this.Cursor = Cursors.Default; NotifierResult.Show(ex.Message, "Error", 100, 1000, 0, NotifyType.Warning); } finally { this.Cursor = Cursors.Default; this.FormState = eFormState.ReadOnly; } }
public void InsertParty() { string result = string.Empty; Party party = null; try { this.Cursor = Cursors.WaitCursor; party = new Party(); party.PARTY_ID = string.Empty; party.PARTY_NAME = this.txtPARTY_NAME.Text; party.PARTY_TYPE = (string)this.icbPARTY_TYPE.EditValue; party.ADD1 = this.txtADD1.Text; party.ADD2 = this.txtADD2.Text; party.ADD3 = this.txtADD3.Text; party.ADD4 = this.txtADD4.Text; party.TEL = this.txtTEL.Text; party.FAX = this.txtFAX.Text; party.EMAIL = this.txtEMAIL.Text; party.PIC = this.txtPIC.Text; party.REMARK = this.txtREMARK.Text; party.REC_STAT = (bool)this.icbREC_STAT.EditValue; using (PartyBLL partyBll = new PartyBLL()) { result = partyBll.InsertParty(ref party, ((frmMainMenu)this.ParentForm).UserID); } if (result.Equals("OK")) { NotifierResult.Show("Insert Complete", "Result", 50, 1000, 50, NotifyType.Safe); } else { NotifierResult.Show(result, "Error", 100, 1000, 0, NotifyType.Warning); } } catch (Exception ex) { this.Cursor = Cursors.Default; NotifierResult.Show(ex.Message, "Error", 100, 1000, 0, NotifyType.Warning); } finally { this.Cursor = Cursors.Default; this.FormState = eFormState.ReadOnly; this.GetPartyList(string.Empty); if (result.Equals("OK")) { this.txtPARTY_ID.Text = party.PARTY_ID; GridView viewList = (GridView)this.grdParty.Views[0]; viewList.ClearSorting(); int position = UiUtility.GetRowHandleByColumnValue(viewList, "PARTY_ID", party.PARTY_ID); if (position != 0) { if (position != GridControl.InvalidRowHandle) { this.dntParty.Position = position; } } else { viewList.FocusedRowHandle = 0; } } } }