public static string[] GetCompletionList(string prefixText, int count, string contextKey) { DMStockLocation Obj_SL = new DMStockLocation(); string[] SearchList = Obj_SL.GetSuggestRecord(prefixText); return(SearchList); }
public void ReportGrid(string RepCondition) { try { DS = Obj_SL.GetStockLocation(RepCondition, out StrError); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { GrdReport.DataSource = DS.Tables[0]; GrdReport.DataBind(); } else { GrdReport.DataSource = null; GrdReport.DataBind(); } if (DS.Tables.Count > 0 && DS.Tables[1].Rows.Count > 0) { ddlcompany.DataSource = DS.Tables[1]; ddlcompany.DataValueField = "CompanyId"; ddlcompany.DataTextField = "CompanyName"; ddlcompany.DataBind(); } Obj_SL = null; DS = null; } catch (Exception ex) { throw new Exception(ex.Message); } }
//User Right Function=========== private void GETDATAFORMAIL(int From, int ClientCompanyID) { try { DMStockLocation Obj_SL = new DMStockLocation(); DataSet DS = new DataSet(); string To = string.Empty; string CC = string.Empty; string Body = string.Empty; int CompanyIndex = 1; DS = Obj_SL.GetStockLocation("", out StrError); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { for (int INDEX = 0; INDEX < DS.Tables[0].Rows.Count; INDEX++) { if (Convert.ToInt32(DS.Tables[0].Rows[INDEX]["#"].ToString()) == Convert.ToInt32(Session["TransactionSiteID"].ToString())) { CompanyIndex = Convert.ToInt32(DS.Tables[0].Rows[INDEX]["CompanyID"].ToString()); } } } if (DS.Tables.Count > 0 && DS.Tables[1].Rows.Count > 0) { DDLKCMPY.DataSource = DS.Tables[1]; DDLKCMPY.DataValueField = "CompanyId"; DDLKCMPY.DataTextField = "CompanyName"; DDLKCMPY.DataBind(); DDLKCMPY.SelectedValue = CompanyIndex.ToString(); } Obj_SL = null; DS = null; TXTKTO.Text = ""; TXTKCC.Text = ""; string description = Server.HtmlDecode("HELLO,<br /><br />PLEASE FIND ATTACHED A PURCHASE ORDER OF THE MATERIAL REQUIRED BY US. PLEASE PROVIDE MATERIAL AS MENTION IN PO.<br /><br />IF THE MATERIAL REQUIRED IS NOT AVAILABLE, THEN PLEASE SUGGEST ALTERNATIVE MATERIAL.<br /><br />REGARDS,<br />" + DDLKCMPY.SelectedItem.ToString()).Replace("<br />", Environment.NewLine); TxtBody.Text = description; LBLID.Text = Convert.ToString(ViewState["MailID"]); GETPDF(Convert.ToInt32(ViewState["MailID"])); GETPDF2(); } catch (Exception ex) { throw new Exception(ex.Message); } }
private void GETDATAFORMAIL(int From, int ClientCompanyID, int WithDetails) { try { DMStockLocation Obj_SL = new DMStockLocation(); DataSet DS = new DataSet(); string To = string.Empty; string CC = string.Empty; string Body = string.Empty; DS = Obj_SL.GetStockLocation("", out StrError); if (DS.Tables.Count > 0 && DS.Tables[1].Rows.Count > 0) { DDLKCMPY.DataSource = DS.Tables[1]; DDLKCMPY.DataValueField = "CompanyId"; DDLKCMPY.DataTextField = "CompanyName"; DDLKCMPY.DataBind(); DDLKCMPY.SelectedValue = "1"; } Obj_SL = null; DS = null; TXTKTO.Text = ""; TXTKCC.Text = ""; string description = string.Empty; if (WithDetails == 0) { description = Server.HtmlDecode("HELLO,<br /><br />AS REQUESTED, PLEASE FIND THE ATTACHED THE CONTACT DETAILS.<br /><br />REGARDS,<br />KARIA DEVELOPERS.").Replace("<br />", Environment.NewLine); } if (WithDetails == 1) { description = Server.HtmlDecode("HELLO,<br /><br />AS REQUESTED, PLEASE FIND THE ATTACHED THE CONTACT DETAILS & THE SUPPLY DETAILS. THIS INFORMATION IS CONFIDENTIAL & WE REQUEST YOU NOT TO SHARE IT.<br /><br />REGARDS,<br />KARIA DEVELOPERS.").Replace("<br />", Environment.NewLine); } TxtBody.Text = description; //TxtBody.Text = "HELLO,<br />PLEASE FIND ATTACHED THE CONTACT CARD AS REQUESTED BY YOU.<br />REGARDS,<br />KARIA DEVELOPERS,<br />PUNE."; //TxtBody.Text.Replace(Environment.NewLine, "<br />"); if (From == 1) { if (WithDetails == 0) { GETCLIENTPDF(Convert.ToInt32(ViewState["EditID"]), 1, 0); LBLDESCWITH.Text = "0"; LBLID.Text = Convert.ToString(ViewState["EditID"]); } else { GETCLIENTPDF(Convert.ToInt32(ViewState["EditID"]), 1, 1); LBLDESCWITH.Text = "1"; LBLID.Text = Convert.ToString(ViewState["EditID"]); } } else if (From == 2) { if (WithDetails == 0) { GETCLIENTPDF(ClientCompanyID, 1, 0); LBLDESCWITH.Text = "0"; LBLID.Text = Convert.ToString(ClientCompanyID); } else { GETCLIENTPDF(ClientCompanyID, 1, 1); LBLDESCWITH.Text = "1"; LBLID.Text = Convert.ToString(ClientCompanyID); } } } catch (Exception ex) { throw new Exception(ex.Message); } }
protected void GrdReport_ItemCommand(object source, RepeaterCommandEventArgs e) { try { switch (e.CommandName) { case ("Select"): { if (Convert.ToInt32(e.CommandArgument) != 0) { ViewState["EditID"] = Convert.ToInt32(e.CommandArgument); DS = Obj_SL.GetStockLOcationForEdit(Convert.ToInt32(e.CommandArgument), out StrError); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { ddlcompany.SelectedValue = DS.Tables[0].Rows[0]["CompanyID"].ToString(); TxtStockLocation.Text = DS.Tables[0].Rows[0]["Location"].ToString(); Txtabbreviations.Text = DS.Tables[0].Rows[0]["abbreviation"].ToString(); TxtSiteAddr.Text = DS.Tables[0].Rows[0]["SiteAddr"].ToString(); if (Convert.ToBoolean(DS.Tables[0].Rows[0]["IsCentral"].ToString()) == true) { chkCenLoc.Checked = true; } else { chkCenLoc.Checked = false; } } else { MakeEmptyForm(); } if (DS.Tables[1].Rows.Count > 0) { GridDetails.DataSource = DS.Tables[1]; GridDetails.DataBind(); ViewState["CurrentTable"] = DS.Tables[1]; } else { SetInitialRow(); } DS = null; Obj_SL = null; if (!FlagEdit) { BtnUpdate.Visible = true; } BtnSave.Visible = false; if (!FladDel) { BtnDelete.Visible = true; } TxtStockLocation.Focus(); MakeControlEmpty(); } break; } } } catch (Exception ex) { throw new Exception(ex.Message); } }