private void UpdateRecords() { A2ZPARTYDTO objDTO = new A2ZPARTYDTO(); objDTO.GroupCode = Converter.GetInteger(ddlGroup.SelectedValue); objDTO.GroupName = Converter.GetString(ddlGroup.SelectedItem.Text); objDTO.PartyCode = Converter.GetInteger(lblNewLPartyNo.Text); objDTO.PartyName = Converter.GetString(txtPartyName.Text); objDTO.PartyAddresss = Converter.GetString(txtPartyAddress.Text); objDTO.PartyMobileNo = Converter.GetString(txtPartyPhone.Text); objDTO.PartyEmail = Converter.GetString(txtPartyEmail.Text); if (ddlGroup.SelectedValue == "12") { objDTO.PartyPurchaseCode = Converter.GetInteger(ddlPurchasePartyName.SelectedValue); objDTO.PartySalesCode = Converter.GetInteger(ddlSalesPartyName.SelectedValue); } else { objDTO.PartyPurchaseCode = Converter.GetInteger(0); objDTO.PartySalesCode = Converter.GetInteger(0); } int roweffect = A2ZPARTYDTO.InsertInformation(objDTO); if (roweffect > 0) { Response.Redirect(Request.RawUrl); } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(Converter.GetInteger(ddlPartyName.SelectedValue))); if (getDTO.PartyName != null) { txtPartyName.Text = Converter.GetString(getDTO.PartyName); txtPartyAddress.Text = Converter.GetString(getDTO.PartyAddresss); txtPartyPhone.Text = Converter.GetString(getDTO.PartyMobileNo); txtPartyEmail.Text = Converter.GetString(getDTO.PartyEmail); if (ddlGroup.SelectedValue == "12") { ddlPurchasePartyName.SelectedValue = Converter.GetString(getDTO.PartyPurchaseCode); ddlSalesPartyName.SelectedValue = Converter.GetString(getDTO.PartySalesCode); } } else { txtPartyName.Text = string.Empty; txtPartyAddress.Text = string.Empty; txtPartyPhone.Text = string.Empty; txtPartyEmail.Text = string.Empty; } }
protected void txtPartyCode_TextChanged(object sender, EventArgs e) { if (txtPartyCode.Text != string.Empty) { int PartyCode = Converter.GetInteger(txtPartyCode.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName == null) { txtPartyName.Text = string.Empty; txtPartyCode.Text = string.Empty; txtPartyCode.Focus(); } else { txtPartyName.Text = Converter.GetString(getDTO.PartyName); AccDropdown(); //CtrlAccNo.Text = Converter.GetString(getDTO.PartyAccNo); //string input = Converter.GetString(CtrlAccNo.Text); //string AccType = input.Substring(0, 2); //CtrlAccType.Text = Converter.GetString(AccType); } } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { txtPartyCode.Text = ddlPartyName.SelectedValue; int PartyCode = Converter.GetInteger(txtPartyCode.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName == null) { txtPartyName.Text = string.Empty; txtPartyCode.Text = string.Empty; txtPartyCode.Focus(); } else { txtPartyName.Text = Converter.GetString(getDTO.PartyName); txtPartyAddressL1.Text = Converter.GetString(getDTO.PartyAddresssLine1); txtPartyAddressL2.Text = Converter.GetString(getDTO.PartyAddresssLine2); txtPartyAddressL3.Text = Converter.GetString(getDTO.PartyAddresssLine3); txtMobileNo.Text = Converter.GetString(getDTO.PartyMobileNo); txtPartyEmail.Text = Converter.GetString(getDTO.PartyEmail); txtCarringRate.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.PartyCarringRate)); } }
protected void txtPayPartyCode_TextChanged(object sender, EventArgs e) { int PartyCode = Converter.GetInteger(txtPayPartyCode.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName != string.Empty) { ddlPayPartyName.SelectedValue = Converter.GetString(getDTO.PartyCode); //txtPayPartyAddress.Text = Converter.GetString(getDTO.PartyAddresssLine1) + " " + Converter.GetString(getDTO.PartyAddresssLine2) + " " + Converter.GetString(getDTO.PartyAddresssLine3); string qry = "SELECT AccType,AccNo,AccCurrency FROM A2ZACCOUNT where AccPartyNo='" + ddlPayPartyName.SelectedValue + "' AND AccCurrency = '99' AND AccStatus = 1"; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZACGMS"); int totrec = dt.Rows.Count; if (totrec > 0) { lblPayPartyAccType.Text = Converter.GetString(dt.Rows[0]["AccType"]); lblPayPartyAccno.Text = Converter.GetString(dt.Rows[0]["AccNo"]); } } else { ddlPayPartyName.SelectedIndex = 0; txtPayPartyCode.Text = string.Empty; txtPayPartyCode.Focus(); } }
protected void txtLoanPartyCode_TextChanged(object sender, EventArgs e) { if (txtLoanPartyCode.Text != string.Empty) { int PartyCode = Converter.GetInteger(txtLoanPartyCode.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName == null) { ddlPartyName.SelectedIndex = 0; txtPartyAddressL1.Text = string.Empty; txtPartyAddressL2.Text = string.Empty; txtPartyAddressL3.Text = string.Empty; txtMobileNo.Text = string.Empty; txtPartyEmail.Text = string.Empty; txtLoanPartyCode.Text = string.Empty; txtLoanPartyCode.Focus(); } else { ddlPartyName.SelectedValue = Converter.GetString(getDTO.PartyCode); txtPartyAddressL1.Text = Converter.GetString(getDTO.PartyAddresssLine1); txtPartyAddressL2.Text = Converter.GetString(getDTO.PartyAddresssLine2); txtPartyAddressL3.Text = Converter.GetString(getDTO.PartyAddresssLine3); txtMobileNo.Text = Converter.GetString(getDTO.PartyMobileNo); txtPartyEmail.Text = Converter.GetString(getDTO.PartyEmail); txtPartyName.Text = Converter.GetString(getDTO.PartyName); } } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPartyName.SelectedIndex != 0) { int PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName != string.Empty) { txtPartyCode.Text = Converter.GetString(getDTO.PartyCode); txtPartyAddress.Text = Converter.GetString(getDTO.PartyAddresssLine1) + " " + Converter.GetString(getDTO.PartyAddresssLine2) + " " + Converter.GetString(getDTO.PartyAddresssLine3); txtCarringRate.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.PartyCarringRate)); string qry = "SELECT AccType,AccNo,AccCurrency FROM A2ZACCOUNT where AccPartyNo='" + txtPartyCode.Text + "' AND AccCurrency = 1 AND AccStatus = 1"; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZACGMS"); int totrec = dt.Rows.Count; if (totrec > 0) { lblPartyAccType.Text = Converter.GetString(dt.Rows[0]["AccType"]); lblPartyAccNo.Text = Converter.GetString(dt.Rows[0]["AccNo"]); } } } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(Converter.GetInteger(ddlPartyName.SelectedValue))); if (getDTO.PartyName != null) { } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPartyName.SelectedIndex != 0) { int PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName != string.Empty) { txtPartyCode.Text = Converter.GetString(getDTO.PartyCode); } } }
protected void ddlOrderNo_SelectedIndexChanged(object sender, EventArgs e) { if (ddlOrderNo.SelectedIndex != 0) { var prm = new object[1]; prm[0] = ddlOrderNo.SelectedValue; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_GetOrderInformationForJPG", prm, "A2ZACOMS"); var p = new A2ZPARTYDTO(); if (dt.Rows.Count > 0) { dvJpgTable.Visible = true; lblOrderNo.Text = Converter.GetString(dt.Rows[0]["OrderNo"]); DateTime Odate = Converter.GetDateTime(dt.Rows[0]["OrderDate"]); lblOrderDate.Text = Odate.ToString("dd/MM/yyyy"); lblOrderPartyJPG.Text = Converter.GetString(dt.Rows[0]["OrderParty"]); // lblItemNameJPG.Text = Converter.GetString(dt.Rows[0]["ItemName"]); lblSizeJPG.Text = Converter.GetString(dt.Rows[0]["ItemSize"]) + " (" + Converter.GetString(dt.Rows[0]["ItemPiece"]) + " PCS)"; lblColorJPG.Text = Converter.GetString(dt.Rows[0]["ItemColor"]); // lblWideJPG.Text = Converter.GetString(dt.Rows[0]["ItemWide"]); lblPerPcsWeight.Text = Converter.GetString(dt.Rows[0]["ItemWeight"]) + " gm"; lblTotalWeight.Text = Converter.GetString(dt.Rows[0]["ItemTotalWeight"]) + " gm"; int FPartyCode = Converter.GetInteger(dt.Rows[0]["FactoryParty"]); A2ZPARTYDTO getDTO2 = (A2ZPARTYDTO.GetPartyInformation(FPartyCode)); DateTime Pdate = Converter.GetDateTime(dt.Rows[0]["DeliveryPossibleDate"]); Pdate = Converter.GetDateTime(dt.Rows[0]["FactoryReceiveDate"]); showimage(); } else { dvJpgTable.Visible = false; } } else { dvJpgTable.Visible = false; } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPartyName.SelectedIndex != 0) { int PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName != string.Empty) { txtPartyCode.Text = Converter.GetString(getDTO.PartyCode); txtPartyAddress.Text = Converter.GetString(getDTO.PartyAddresssLine1) + " " + Converter.GetString(getDTO.PartyAddresssLine2) + " " + Converter.GetString(getDTO.PartyAddresssLine3); ddlCurrency_SelectedIndexChanged(this, e); CurrencyAndLocationSelection(); } } }
protected void txtPartyCode_TextChanged(object sender, EventArgs e) { int PartyCode = Converter.GetInteger(txtPartyCode.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName != string.Empty) { ddlPartyName.SelectedValue = Converter.GetString(getDTO.PartyCode); txtPartyAddress.Text = Converter.GetString(getDTO.PartyAddresssLine1) + " " + Converter.GetString(getDTO.PartyAddresssLine2) + " " + Converter.GetString(getDTO.PartyAddresssLine3); } else { ddlPartyName.SelectedIndex = 0; txtPartyCode.Text = string.Empty; txtPartyCode.Focus(); } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (ddlGroup.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Select Group Code');", true); return; } if (txtPartyName.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Name');", true); return; } try { A2ZPARTYDTO objDTO = new A2ZPARTYDTO(); objDTO.GroupCode = Converter.GetInteger(ddlGroup.SelectedValue); objDTO.GroupName = Converter.GetString(ddlGroup.SelectedItem.Text); objDTO.PartyCode = Converter.GetInteger(txtPartyCode.Text); objDTO.PartyName = Converter.GetString(txtPartyName.Text); objDTO.PartyAddresssLine1 = Converter.GetString(txtPartyAddressL1.Text); objDTO.PartyAddresssLine2 = Converter.GetString(txtPartyAddressL2.Text); objDTO.PartyAddresssLine3 = Converter.GetString(txtPartyAddressL3.Text); objDTO.PartyMobileNo = Converter.GetString(txtMobileNo.Text); objDTO.PartyEmail = Converter.GetString(txtPartyEmail.Text); int roweffect = A2ZPARTYDTO.UpdateParty(objDTO); if (roweffect > 0) { ClearRecords(); ddlGroup.Focus(); } } catch (Exception Ex) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Data not inserted');", true); return; } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { int PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName == null) { txtPartyCode.Text = string.Empty; txtPartyCode.Focus(); } else { txtPartyCode.Text = Converter.GetString(getDTO.PartyCode); txtCurrentBalance.Text = string.Empty; } }
protected void btnUpdate_Click(object sender, EventArgs e) { A2ZPARTYDTO objDTO = new A2ZPARTYDTO(); objDTO.PartyName = Converter.GetString(txtPartyName.Text); objDTO.PartyAddresssLine1 = Converter.GetString(txtPartyAddressL1.Text); objDTO.PartyAddresssLine2 = Converter.GetString(txtPartyAddressL2.Text); objDTO.PartyAddresssLine3 = Converter.GetString(txtPartyAddressL3.Text); objDTO.PartyMobileNo = Converter.GetString(txtMobileNo.Text); objDTO.PartyEmail = Converter.GetString(txtPartyEmail.Text); objDTO.PartyCode = Converter.GetInteger(txtLoanPartyCode.Text); //int roweffect = A2ZPARTYDTO.UpdateLoanParty(objDTO); //if (roweffect > 0) //{ // Response.Redirect(Request.RawUrl); //} }
protected void txtPartyCode_TextChanged(object sender, EventArgs e) { if (txtPartyCode.Text != string.Empty) { int PartyCode = Converter.GetInteger(txtPartyCode.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName == null) { txtPartyCode.Text = string.Empty; txtPartyCode.Focus(); } else { ddlPartyName.SelectedValue = txtPartyCode.Text; } } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPartyName.SelectedIndex != 0) { int PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName != string.Empty) { txtLoanPartyCode.Text = Converter.GetString(getDTO.PartyCode); txtPartyAddressL1.Text = Converter.GetString(getDTO.PartyAddresssLine1); txtPartyAddressL2.Text = Converter.GetString(getDTO.PartyAddresssLine2); txtPartyAddressL3.Text = Converter.GetString(getDTO.PartyAddresssLine3); txtMobileNo.Text = Converter.GetString(getDTO.PartyMobileNo); txtPartyEmail.Text = Converter.GetString(getDTO.PartyEmail); txtPartyName.Text = Converter.GetString(getDTO.PartyName); } } }
protected void ddlOrderNo_SelectedIndexChanged(object sender, EventArgs e) { if (ddlOrderNo.SelectedIndex != 0) { var prm = new object[1]; prm[0] = ddlOrderNo.SelectedValue; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_GetOrderInformation", prm, "A2ZACOMS"); var p = new A2ZPARTYDTO(); if (dt.Rows.Count > 0) { DateTime Odate = Converter.GetDateTime(dt.Rows[0]["OrderDate"]); txtOrderDate.Text = Odate.ToString("dd/MM/yyyy"); ddlOrderParty.SelectedValue = Converter.GetString(dt.Rows[0]["OrderParty"]); ddlWayToOrder.SelectedValue = Converter.GetString(dt.Rows[0]["WayToOrder"]); txtWayToOrderNo.Text = Converter.GetString(dt.Rows[0]["WayToOrderNo"]); DateTime Pdate = Converter.GetDateTime(dt.Rows[0]["DeliveryPossibleDate"]); txtDeliveryPossibleDate.Text = Pdate.ToString("dd/MM/yyyy"); ddlItemName.SelectedValue = Converter.GetString(dt.Rows[0]["ItemCode"]); ddlKarat.SelectedValue = Converter.GetString(dt.Rows[0]["ItemKarat"]); txtSize.Text = Converter.GetString(dt.Rows[0]["ItemSize"]); txtColor.Text = Converter.GetString(dt.Rows[0]["ItemColor"]); txtLength.Text = Converter.GetString(dt.Rows[0]["ItemLength"]); txtPiece.Text = Converter.GetString(dt.Rows[0]["ItemPiece"]); txtWeight.Text = Converter.GetString(dt.Rows[0]["ItemWeight"]); txtTotalWeight.Text = Converter.GetString(dt.Rows[0]["ItemTotalWeight"]); txtWide.Text = Converter.GetString(dt.Rows[0]["ItemWide"]); txtPiece.Text = Converter.GetString(dt.Rows[0]["ItemPiece"]); txtWhoseOrder.Text = Converter.GetString(dt.Rows[0]["WhoseOrder"]); txtPhoneNo.Text = Converter.GetString(dt.Rows[0]["WhoseOrderPhone"]); showimage(); } } }
private void UpdateRecords() { A2ZPARTYDTO objDTO = new A2ZPARTYDTO(); objDTO.GroupCode = Converter.GetInteger(ddlGroup.SelectedValue); objDTO.GroupName = Converter.GetString(ddlGroup.SelectedItem.Text); objDTO.PartyCode = Converter.GetInteger(lblnewPartyNo.Text); objDTO.PartyName = Converter.GetString(txtPartyName.Text); objDTO.PartyAddresssLine1 = Converter.GetString(txtPartyAddress.Text); objDTO.PartyMobileNo = Converter.GetString(txtMobileNo.Text); objDTO.PartyEmail = Converter.GetString(txtPartyEmail.Text); int roweffect = A2ZPARTYDTO.InsertInformation(objDTO); if (roweffect > 0) { Response.Redirect(Request.RawUrl); } }
protected void txtPartyCode_TextChanged(object sender, EventArgs e) { if (txtPartyCode.Text != string.Empty) { string input = Converter.GetString(txtPartyCode.Text); string GroupCode = input.Substring(0, 2); if (GroupCode != ddlGroup.SelectedValue) { txtPartyCode.Text = string.Empty; txtPartyCode.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Invalid Party Code');", true); return; } int PartyCode = Converter.GetInteger(txtPartyCode.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyCode > 0) { txtPartyName.Text = Converter.GetString(getDTO.PartyName); txtPartyAddressL1.Text = Converter.GetString(getDTO.PartyAddresssLine1); txtPartyAddressL2.Text = Converter.GetString(getDTO.PartyAddresssLine2); txtPartyAddressL3.Text = Converter.GetString(getDTO.PartyAddresssLine3); txtMobileNo.Text = Converter.GetString(getDTO.PartyMobileNo); txtPartyEmail.Text = Converter.GetString(getDTO.PartyEmail); txtCarringRate.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.PartyCarringRate)); } else { txtPartyCode.Text = string.Empty; txtPartyCode.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Invalid Party Code');", true); return; } } }
protected void btnSubmit_Click(object sender, EventArgs e) { A2ZPARTYDTO objDTO = new A2ZPARTYDTO(); objDTO.PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue); objDTO.PartyName = Converter.GetString(txtPartyName.Text); objDTO.PartyAddresss = Converter.GetString(txtPartyAddress.Text); objDTO.PartyMobileNo = Converter.GetString(txtPartyPhone.Text); objDTO.PartyEmail = Converter.GetString(txtPartyEmail.Text); int roweffect = A2ZPARTYDTO.UpdateParty(objDTO); if (roweffect > 0) { Response.Redirect(Request.RawUrl); } }
protected void ddlPartyName_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPartyName.SelectedIndex != 0) { int PartyCode = Converter.GetInteger(ddlPartyName.SelectedValue); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyName != string.Empty) { txtPartyCode.Text = Converter.GetString(getDTO.PartyCode); AccDropdown(); //CtrlAccNo.Text = Converter.GetString(getDTO.PartyAccNo); //string input = Converter.GetString(CtrlAccNo.Text); //string AccType = input.Substring(0, 2); //CtrlAccType.Text = Converter.GetString(AccType); } } }
private void UpdateRecords() { A2ZPARTYDTO objDTO = new A2ZPARTYDTO(); objDTO.GroupCode = Converter.GetInteger(ddlGroup.SelectedValue); objDTO.GroupName = Converter.GetString(ddlGroup.SelectedItem.Text); objDTO.PartyCode = Converter.GetInteger(lblNewLPartyNo.Text); //objDTO.PartyAccNo = Converter.GetLong(ctrlNewAccNo.Text); objDTO.PartyName = Converter.GetString(txtPartyName.Text); objDTO.PartyAddresssLine1 = Converter.GetString(txtPartyAddressL1.Text); objDTO.PartyAddresssLine2 = Converter.GetString(txtPartyAddressL2.Text); objDTO.PartyAddresssLine3 = Converter.GetString(txtPartyAddressL3.Text); objDTO.PartyMobileNo = Converter.GetString(txtMobileNo.Text); objDTO.PartyEmail = Converter.GetString(txtPartyEmail.Text); objDTO.PartyCarringRate = Converter.GetDecimal(txtCarringRate.Text); int roweffect = A2ZPARTYDTO.InsertInformation(objDTO); if (roweffect > 0) { UpdatedMSG(); //DivLedgerMaint.Visible = false; //DivMain.Attributes.CssStyle.Add("opacity", "300"); ClearRecords(); txtPartyName.Focus(); //Response.Redirect(Request.RawUrl); } }
protected void ddlCurrency_SelectedIndexChanged(object sender, EventArgs e) { int location = Converter.GetInteger(ddlLocation.SelectedValue); int currency = Converter.GetInteger(ddlCurrency.SelectedValue); A2ZINVCTRLDTO getDTO = (A2ZINVCTRLDTO.GetInformation(location, currency)); if (getDTO.Location > 0) { Int64 accno1 = Converter.GetLong(getDTO.GoldLedger); A2ZPARTYDTO get1DTO = (A2ZPARTYDTO.GetAccNoInformation(accno1)); if (get1DTO.PartyCode > 0) { ddlCurrency1.SelectedValue = Converter.GetString(get1DTO.PartyCurrencyCode); MetalDropdown(); ddlMetalLedger.SelectedValue = Converter.GetString(getDTO.GoldLedger); } Int64 accno2 = Converter.GetLong(getDTO.CarryingLedger); if (accno2 != 0) { A2ZPARTYDTO get2DTO = (A2ZPARTYDTO.GetAccNoInformation(accno2)); if (get2DTO.PartyCode > 0) { ddlCurrency2.SelectedValue = Converter.GetString(get2DTO.PartyCurrencyCode); CarryingDropdown(); ddlCarryingLedger.SelectedValue = Converter.GetString(getDTO.CarryingLedger); } } Int64 accno3 = Converter.GetLong(getDTO.MakingLedger); A2ZPARTYDTO get3DTO = (A2ZPARTYDTO.GetAccNoInformation(accno3)); if (get3DTO.PartyCode > 0) { ddlCurrency3.SelectedValue = Converter.GetString(get3DTO.PartyCurrencyCode); MakingDropdown(); ddlMakingLedger.SelectedValue = Converter.GetString(getDTO.MakingLedger); } Int64 accno4 = Converter.GetLong(getDTO.StoneLedger); A2ZPARTYDTO get4DTO = (A2ZPARTYDTO.GetAccNoInformation(accno4)); if (get4DTO.PartyCode > 0) { ddlCurrency4.SelectedValue = Converter.GetString(get4DTO.PartyCurrencyCode); StoneDropdown(); ddlStoneLedger.SelectedValue = Converter.GetString(getDTO.StoneLedger); } } else { ddlCurrency.SelectedIndex = 0; ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Record Not in File');", true); return; } }
protected void BtnSelect_Click(object sender, EventArgs e) { try { Button b = (Button)sender; GridViewRow r = (GridViewRow)b.NamingContainer; Label OrderNo = (Label)gvOrderInfo.Rows[r.RowIndex].Cells[2].FindControl("lblOrderNo"); Label OrderStat = (Label)gvOrderInfo.Rows[r.RowIndex].Cells[8].FindControl("lblOrderStatus"); CtrlOrdStatus.Text = Converter.GetString(OrderStat.Text); //string qry1 = "SELECT * FROM A2ZORDERDETAILS WHERE OrderNo = '"+OrderNo.Text+"'"; //DataTable dt1 = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry1, "A2ZACOMS"); //if (dt1.Rows.Count > 0) //{ var prm = new object[1]; prm[0] = OrderNo.Text; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_GetOrderInformation", prm, "A2ZACOMS"); var p = new A2ZPARTYDTO(); if (dt.Rows.Count > 0) { dvJpgTable.Visible = true; lblOrderNo.Text = Converter.GetString(dt.Rows[0]["OrderNo"]); DateTime Odate = Converter.GetDateTime(dt.Rows[0]["OrderDate"]); lblOrderDate.Text = Odate.ToString("dd/MM/yyyy"); lblOrderPartyJPG.Text = Converter.GetString(dt.Rows[0]["OrderParty"]); int PartyCode = Converter.GetInteger(lblOrderPartyJPG.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyCode > 0) { lblOrderPartyName.Text = Converter.GetString(getDTO.PartyName); } if (Converter.GetString(dt.Rows[0]["WayToOrder"]) == "1") { lblWayToOrderJPG.Text = "Whatsapp"; } if (Converter.GetString(dt.Rows[0]["WayToOrder"]) == "2") { lblWayToOrderJPG.Text = "Email"; } DateTime Pdate = Converter.GetDateTime(dt.Rows[0]["DeliveryPossibleDate"]); lblDeliverypossibleDateJPG.Text = Pdate.ToString("dd/MM/yyyy"); lblItemNameJPG.Text = Converter.GetString(dt.Rows[0]["ItemName"]); lblItemKaratJPG.Text = Converter.GetString(dt.Rows[0]["ItemKarat"]); lblSizeJPG.Text = Converter.GetString(dt.Rows[0]["ItemSize"]); lblColorJPG.Text = Converter.GetString(dt.Rows[0]["ItemColor"]); lblLengthJPG.Text = Converter.GetString(dt.Rows[0]["ItemLength"]); lblPieceJPG.Text = Converter.GetString(dt.Rows[0]["ItemPiece"]); lblWeightPerPieceJPG.Text = Converter.GetString(dt.Rows[0]["ItemWeight"]); lblTotalWeightJPG.Text = Converter.GetString(dt.Rows[0]["ItemTotalWeight"]); lblWideJPG.Text = Converter.GetString(dt.Rows[0]["ItemWide"]); lblWhoseOrderJPG.Text = Converter.GetString(dt.Rows[0]["WhoseOrder"]); lblWhoseOrderPhoneNoJPG.Text = Converter.GetString(dt.Rows[0]["WhoseOrderPhone"]); showimage(); } else { dvJpgTable.Visible = false; } //} } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnEdit_Click Problem');</script>"); //throw ex; } }
protected void ddlOrderNo_SelectedIndexChanged(object sender, EventArgs e) { if (ddlOrderNo.SelectedIndex != 0) { var prm = new object[1]; prm[0] = ddlOrderNo.SelectedValue; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_GetOrderInformationForJPG", prm, "A2ZACOMS"); var p = new A2ZPARTYDTO(); if (dt.Rows.Count > 0) { dvJpgTable.Visible = true; lblOrderNo.Text = Converter.GetString(dt.Rows[0]["OrderNo"]); DateTime Odate = Converter.GetDateTime(dt.Rows[0]["OrderDate"]); lblOrderDate.Text = Odate.ToString("dd/MM/yyyy"); lblOrderPartyJPG.Text = Converter.GetString(dt.Rows[0]["OrderParty"]); if (rbtWithParty.Checked == true) { int PartyCode = Converter.GetInteger(lblOrderPartyJPG.Text); A2ZPARTYDTO getDTO = (A2ZPARTYDTO.GetPartyInformation(PartyCode)); if (getDTO.PartyCode > 0) { lblOrderPartyName.Text = Converter.GetString(getDTO.PartyName); } } else { lblOrderPartyName.Text = string.Empty; } int FPartyCode = Converter.GetInteger(dt.Rows[0]["FactoryParty"]); A2ZPARTYDTO getDTO2 = (A2ZPARTYDTO.GetPartyInformation(FPartyCode)); if (getDTO2.PartyCode > 0) { lblFactoryName.Text = Converter.GetString(getDTO2.PartyName); } if (Converter.GetString(dt.Rows[0]["WayToOrder"]) == "1") { lblWayToOrderJPG.Text = "Whatsapp"; } if (Converter.GetString(dt.Rows[0]["WayToOrder"]) == "2") { lblWayToOrderJPG.Text = "Email"; } DateTime Pdate = Converter.GetDateTime(dt.Rows[0]["DeliveryPossibleDate"]); lblDeliverypossibleDateJPG.Text = Pdate.ToString("dd/MM/yyyy"); lblItemNameJPG.Text = Converter.GetString(dt.Rows[0]["ItemName"]); lblSizeJPG.Text = Converter.GetString(dt.Rows[0]["ItemSize"]); lblColorJPG.Text = Converter.GetString(dt.Rows[0]["ItemColor"]); lblPieceJPG.Text = Converter.GetString(dt.Rows[0]["ItemPiece"]); lblWideJPG.Text = Converter.GetString(dt.Rows[0]["ItemWide"]); lblWayToOrderPhoneJPG.Text = Converter.GetString(dt.Rows[0]["WayToOrderNo"]); lblPendingDays.Text = Converter.GetString(dt.Rows[0]["PendingDay"] + " Day"); lblDeliverypossibleDateJPG.Text = Pdate.ToString("dd/MM/yyyy"); Pdate = Converter.GetDateTime(dt.Rows[0]["FactoryReceiveDate"]); if (Pdate == DateTime.MinValue) { lblFactoryReceiveStatus.Text = " Not Received "; lblFactoryReceiveStatusDate.Text = "N/A"; } else { lblFactoryReceiveStatus.Text = " Received "; lblFactoryReceiveStatusDate.Text = Pdate.ToString("dd/MM/yyyy"); } int FactoryReceivePendingDay = Converter.GetInteger(dt.Rows[0]["FactoryReceivePendingDay"]); if (FactoryReceivePendingDay < 0) { lblFactoryReceiveStatusMode.Text = "Delay : " + Math.Abs(FactoryReceivePendingDay) + " Days"; } else { lblFactoryReceiveStatusMode.Text = "Pending : " + Math.Abs(FactoryReceivePendingDay) + " Days"; } Pdate = Converter.GetDateTime(dt.Rows[0]["ReadyInFactoryDate"]); if (Pdate == DateTime.MinValue) { lblFactoryStatus.Text = " Not Ready "; lblFactoryStatusDate.Text = "N/A"; } else { lblFactoryStatus.Text = " Ready "; lblFactoryStatusDate.Text = Pdate.ToString("dd/MM/yyyy"); } int FactoryPendingDay = Converter.GetInteger(dt.Rows[0]["FactoryPendingDay"]); if (FactoryPendingDay < 0) { lblFactoryStatusMode.Text = "Delay : " + Math.Abs(FactoryPendingDay) + " Days"; } else { lblFactoryStatusMode.Text = "Pending : " + Math.Abs(FactoryPendingDay) + " Days"; } Pdate = Converter.GetDateTime(dt.Rows[0]["SendToFactoryDate"]); Pdate = Converter.GetDateTime(dt.Rows[0]["SendToTransitDate"]); if (Pdate == DateTime.MinValue) { lblTransitStatus.Text = " Not in Transit "; lblTransitStatusDate.Text = "N/A"; } else { lblTransitStatus.Text = " Send to Transit "; lblTransitStatusDate.Text = Pdate.ToString("dd/MM/yyyy"); } int TransitPendingDay = Converter.GetInteger(dt.Rows[0]["TransitPendingDay"]); if (TransitPendingDay < 0) { lblTransitStatusMode.Text = "Delay : " + Math.Abs(TransitPendingDay) + " Days"; } else { lblTransitStatusMode.Text = "Pending : " + Math.Abs(TransitPendingDay) + " Days"; } Pdate = Converter.GetDateTime(dt.Rows[0]["ReceiveFromTransitDate"]); if (Pdate == DateTime.MinValue) { lblReceiveStatus.Text = " Not Received "; lblReceiveStatusDate.Text = "N/A"; } else { lblReceiveStatus.Text = " Received "; lblReceiveStatusDate.Text = Pdate.ToString("dd/MM/yyyy"); } int ReceiveDay = Converter.GetInteger(dt.Rows[0]["ReceivePendingDay"]); if (TransitPendingDay < 0) { lblReceiveStatusMode.Text = "Delay : " + Math.Abs(ReceiveDay) + " Days"; } else { lblReceiveStatusMode.Text = "Pending : " + Math.Abs(ReceiveDay) + " Days"; } showimage(); } else { dvJpgTable.Visible = false; } } else { dvJpgTable.Visible = false; } }