private void LoadAccountGroup() { try { DataSet dsCategory = sqlobj.ExecuteSP("SP_AccountMaster", new SqlParameter() { ParameterName = "@IMode", SqlDbType = SqlDbType.Int, Value = 7 }); ddlAccountGroup.Items.Clear(); if (dsCategory.Tables[0].Rows.Count > 0) { rgAcccountGroup.DataSource = dsCategory; rgAcccountGroup.DataBind(); ddlAccountGroup.DataSource = dsCategory; ddlAccountGroup.DataTextField = "AccountGroup"; ddlAccountGroup.DataValueField = "AccountGroup"; ddlAccountGroup.DataBind(); } else { rgAcccountGroup.DataSource = string.Empty; rgAcccountGroup.DataBind(); } dsCategory.Dispose(); ddlAccountGroup.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0")); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void LoaddrpItem() { try { DataSet dsDetails = sqlobj.ExecuteSP("CC_ALACARTECOUNT", new SqlParameter() { ParameterName = "@IMODE", SqlDbType = SqlDbType.Int, Value = 1 }, new SqlParameter() { ParameterName = "@FROMDATE", SqlDbType = SqlDbType.DateTime, Value = rdFrom.SelectedDate }, new SqlParameter() { ParameterName = "@TILLDATE", SqlDbType = SqlDbType.DateTime, Value = rdTill.SelectedDate }, new SqlParameter() { ParameterName = "@ITEM", SqlDbType = SqlDbType.NVarChar, Value = "All" }); if (dsDetails.Tables[0].Rows.Count > 0) { drpItem.DataSource = dsDetails.Tables[1]; drpItem.DataValueField = "ItemName"; drpItem.DataTextField = "ItemName"; drpItem.DataBind(); } drpItem.Items.Insert(0, new ListItem("All", "All")); dsDetails.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message.ToString()); } }
private void LoadTitle() { try { DataSet dsTitle = sqlobj.ExecuteSP("SP_GetTitleMenus", new SqlParameter() { ParameterName = "@MenuId", SqlDbType = SqlDbType.Int, Value = 137 }); if (dsTitle.Tables[0].Rows.Count > 0) { lnktitle.Text = dsTitle.Tables[0].Rows[0]["Title"].ToString(); lnktitle.ToolTip = dsTitle.Tables[0].Rows[0]["Description"].ToString(); } dsTitle.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void LoadAssignedTo() { try { SqlProcsNew sqlobj = new SqlProcsNew(); DataSet dsFetchAT = new DataSet(); dsFetchAT = sqlobj.ExecuteSP("SP_FecthVillaNO", new SqlParameter() { ParameterName = "@IMODE", SqlDbType = SqlDbType.Int, Value = 2 }); ddlAssignedTo.DataSource = dsFetchAT.Tables[0]; ddlAssignedTo.DataValueField = "RSN"; ddlAssignedTo.DataTextField = "Name"; ddlAssignedTo.DataBind(); ddlAssignedTo.Dispose(); ddlAssignedTo.Items.Insert(0, new ListItem("--Select--", "0")); } catch (Exception ex) { WebMsgBox.Show(ex.Message.ToString()); } }
protected void txtBrCode_TextChanged(object sender, EventArgs e) { try { if (txtBrCode.Text.ToString() != "") { string BrName = SB.GetBranchName(txtBrCode.Text.ToString()); if (BrName != null || BrName != "") { ClearProdText(); AutoGlName.ContextKey = txtBrCode.Text.ToString(); txtBrName.Text = BrName; txtProdType.Focus(); } else { ClearAllData(); WebMsgBox.Show("Enter valid branch code...!!", this.Page); txtBrCode.Focus(); } } else { ClearAllData(); WebMsgBox.Show("Enter branch code first...!!", this.Page); txtBrName.Text = ""; txtBrCode.Text = ""; txtBrCode.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void ddlDinersSession_SelectedIndexChanged(object sender, EventArgs e) { try { if (chkDoorNo.Checked == true) { LoadResident(Convert.ToInt32(ddlforwhom.SelectedValue), 2); } else { LoadResident(Convert.ToInt32(ddlforwhom.SelectedValue), 1); } LoadBooking(); LoadDinerspersessiondetailsTotal(); LoadDiningStatus(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
private void InsertData(string sFlag) { try { dtFirst = new DataTable(); dtFirst = CreateFirst(dtFirst); int tmp = 0; foreach (GridViewRow gvRow in GridView1009.Rows) { if (((CheckBox)gvRow.FindControl("chk")).Checked == true) { dtFirst.Rows.Add(GridView1009.DataKeys[gvRow.DataItemIndex].Value, ((Label)gvRow.FindControl("lblBrCd")).Text, ((Label)gvRow.FindControl("lblProduct")).Text, ((Label)gvRow.FindControl("lblAccno")).Text); string[] AT = dtFirst.Rows[tmp]["ID"].ToString().Split('_'); ViewState["Custno"] = AT[0].ToString(); Result = RO.InsertTrans((((Label)gvRow.FindControl("lblBrCd")).Text), (((Label)gvRow.FindControl("lblProduct")).Text), (((Label)gvRow.FindControl("lblAccno")).Text), ((TextBox)gvRow.FindControl("TxtCustno")).Text, ((TextBox)gvRow.FindControl("TxtLimit")).Text, ((TextBox)gvRow.FindControl("TxtROI")).Text, ((TextBox)gvRow.FindControl("TxtOpDate")).Text, ((TextBox)gvRow.FindControl("TxtDueDate")).Text, ((TextBox)gvRow.FindControl("TxtPeriod")).Text, ((TextBox)gvRow.FindControl("TxtIntAmt")).Text, ((TextBox)gvRow.FindControl("TxtMatAmt")).Text, ((TextBox)gvRow.FindControl("TxtLien")).Text, ((TextBox)gvRow.FindControl("TxtLienAmt")).Text, ((TextBox)gvRow.FindControl("TxtTrfAcType")).Text, ((TextBox)gvRow.FindControl("TxtTrfAcc")).Text, ((TextBox)gvRow.FindControl("TxtStatus")).Text, ((TextBox)gvRow.FindControl("TxtIntPay")).Text, ((TextBox)gvRow.FindControl("TxtlastIntDT")).Text, ((TextBox)gvRow.FindControl("TxtRemark")).Text, ((TextBox)gvRow.FindControl("TxtRecSrno")).Text, ((TextBox)gvRow.FindControl("TxtRECEIPT_NO")).Text, ((TextBox)gvRow.FindControl("TxtPTD")).Text, ((TextBox)gvRow.FindControl("TxtPTM")).Text, ((TextBox)gvRow.FindControl("TxtPTY")).Text, Session["MID"].ToString(), ((TextBox)gvRow.FindControl("TxtSTAGE")).Text); tmp++; } } if (Result > 0) { WebMsgBox.Show("Sucessfully Modify...!!", this.Page); GridView1009.Visible = false; ClearData(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { int qh = UsersService.UsersInfo_CheckLogin(txtUserName.Text, txtPassword.Text); if (qh > 0) { switch (qh) { case 1: Session["UserName"] = txtUserName.Text.Trim(); Response.Redirect("~/Admins/Default.aspx"); break; case 2: Session["UserName"] = txtUserName.Text.Trim(); Response.Redirect("Default2.aspx"); break; } } else { WebMsgBox.Show("Sai thông tin đăng nhập!"); } }
protected void TxtTaccno_TextChanged(object sender, EventArgs e) { { try { string[] AN; AN = customcs.GetAccountName(TxtTaccno.Text, TxtTprdcode.Text, Session["BRCD"].ToString()).Split('_'); if (AN != null) { TxtTaccname.Text = AN[1].ToString(); } else { WebMsgBox.Show("Account Number is Invalid....!", this.Page); TxtTaccno.Text = ""; TxtTaccno.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } } }
protected void lnkCheckESPForDocuments_Click(object sender, EventArgs e) { string sTicket = (ConfigurationManager.AppSettings["espticket"] != null) ? ConfigurationManager.AppSettings["espticket"].ToString() : string.Empty; ESPWebService ws = new ESPWebService(); if (ws != null) { ws.Discover(); string xmlDocList = ws.GetAwaitingDocuments(sTicket); ws.Dispose(); XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlDocList); if (doc.SelectSingleNode("//error") != null) { WebMsgBox.Show(this, doc.SelectSingleNode("//error").Value); } else { DocumentDAO docDAO = new DocumentDAO(); foreach (XmlNode node in doc.SelectNodes("//dokument")) { if (!docDAO.ESPDocExist(node.Attributes["id"].Value)) { docDAO.AddAwaitingESPDocument(node.Attributes["id"].Value, node.Attributes["nazwa"].Value, node.Attributes["opis"].Value); } } gvESPDocumentsList.DataBind(); } } else { WebMsgBox.Show(this, "Nie udało się połączyć z ESP"); } }
protected void Btnreport_Click(object sender, EventArgs e) { try { if (TxtBRCD.Text != null && TxtPRD.Text != null) { BRCD = TxtBRCD.Text.Trim(); GLCODE = TxtPRD.Text.Trim(); } else { WebMsgBox.Show("Fields cannot be Blanked!!", this.Page); } FL = "Insert";//ankita 15/09/2017 string Res = CLM.LOGDETAILS(FL, Session["BRCD"].ToString(), Session["MID"].ToString(), "AccCount_Rpt" + "_" + Session["LOGINCODE"].ToString() + "", "00", Session["MID"].ToString()); string redirectURL = "FrmRView.aspx?&BRCD=" + BRCD + "&GLCODE=" + GLCODE + "&UserName="******"UserName"].ToString() + "&rptname=RptAccCount.rdlc"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('" + redirectURL + "','_blank')", true); } catch (Exception ex) { ExceptionLogging.SendErrorToText(ex); } }
//Load Data Shop Cart By Click Bill ID public DataSet Load_ShopCart_ByClickBillID(int ID) { try { DataSet dset = new DataSet(); string commandText = "SP_GetList_ShopCart_ByClickBillID"; SqlCommand command = new SqlCommand(commandText, conn.Connect()); command.CommandType = CommandType.StoredProcedure; SqlParameter pr_ID = command.Parameters.Add("@Bill_ID", SqlDbType.Int); pr_ID.Value = ID; SqlDataAdapter adapter = new SqlDataAdapter(command); adapter.Fill(dset); return(dset); } catch (SqlException e) { WebMsgBox.Show(e.Message); } finally { conn.Close_Connection(); } return(null); }
private void GetUploadExcelFileName() { try { DirectoryInfo Dirinfo = new DirectoryInfo(string.Concat(Server.MapPath("~/EXData/"))); FileInfo[] FilInfo = Dirinfo.GetFiles("*.xls"); if (FilInfo != null) { ddl_TableName.Items.Clear(); foreach (FileInfo fi in FilInfo) { ddl_TableName.Items.Add(fi.ToString()); } } else { WebMsgBox.Show("Upload a Import File"); } } catch (Exception ex) { WebMsgBox.Show(ex.ToString()); } }
protected void btnGroupSave_Click(object sender, EventArgs e) { try { //if (CnfResult.Value == "true") //{ sqlobj.ExecuteSQLNonQuery("SP_AccountMaster", new SqlParameter() { ParameterName = "@IMode", SqlDbType = SqlDbType.Int, Value = 6 }, new SqlParameter() { ParameterName = "@AccountGroup", SqlDbType = SqlDbType.NVarChar, Value = txtAccountGroup.Text }, new SqlParameter() { ParameterName = "@UserID", SqlDbType = SqlDbType.NVarChar, Value = Session["UserID"].ToString() } ); ClearGroup(); rwAccountGroup.Visible = true; WebMsgBox.Show("New Account Group added."); //} } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
private void LoadByOwner() { try { SqlProcsNew sqlobj = new SqlProcsNew(); DataSet dsFetchSE = new DataSet(); dsFetchSE = sqlobj.ExecuteSP("SP_DailyDinersUpdateDropDown", new SqlParameter() { ParameterName = "@Mode", SqlDbType = SqlDbType.Int, Value = 2 }, new SqlParameter() { ParameterName = "@Date", SqlDbType = SqlDbType.DateTime, Value = DateTime.Now.ToString("yyyy-MM-dd") }, new SqlParameter() { ParameterName = "@SessionCode", SqlDbType = SqlDbType.NVarChar, Value = Session["SessionCode"].ToString() } ); ddlRByName.DataSource = dsFetchSE.Tables[0]; ddlRByName.DataValueField = "rtrsn"; ddlRByName.DataTextField = "Name"; ddlRByName.DataBind(); ddlRByName.Items.Insert(0, new ListItem("--Select--", "0")); chkRByName.Enabled = true; } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void TxtFaccname_TextChanged(object sender, EventArgs e) { try { string CUNAME = TxtFaccname.Text; string[] custnob = CUNAME.Split('_'); if (custnob.Length > 1) { TxtFaccname.Text = custnob[0].ToString(); TxtFaccno.Text = custnob[1].ToString(); TxtTaccno.Focus(); } else { WebMsgBox.Show("Account Number is Invalid....!", this.Page); TxtFaccno.Text = ""; TxtFaccno.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
private void LoadTodayBirthday() { try { SqlProcsNew sqlobj = new SqlProcsNew(); DataSet dsTodaysEvents = sqlobj.ExecuteSP("SP_GetBirthday" ); if (dsTodaysEvents.Tables[0].Rows.Count > 0) { string names = ""; for (int i = 0; i < dsTodaysEvents.Tables[0].Rows.Count; i++) { if (names == "") { names = dsTodaysEvents.Tables[0].Rows[i]["RTNAME"].ToString(); } else { names = names + ',' + dsTodaysEvents.Tables[0].Rows[i]["RTNAME"].ToString(); } } lblcbirthday.Text = "Greetings on birthday for " + names.ToString(); } } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
private void LoadSession() { try { SqlProcsNew sqlobj = new SqlProcsNew(); DataSet dsFetchSE = new DataSet(); dsFetchSE = sqlobj.ExecuteSP("SP_ConfirmDinersSessionFilter", new SqlParameter() { ParameterName = "@Date", SqlDbType = SqlDbType.DateTime, Value = dtpDiners.SelectedDate.Value }); ddlDinersSession.Items.Clear(); if (dsFetchSE.Tables.Count > 0) { if (dsFetchSE.Tables[0].Rows.Count > 0) { ddlDinersSession.DataSource = dsFetchSE.Tables[0]; ddlDinersSession.DataValueField = "SCode"; ddlDinersSession.DataTextField = "SName"; ddlDinersSession.DataBind(); } } ddlDinersSession.Items.Insert(0, new ListItem("--Select--", "0")); dsFetchSE.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
private void InsertData_GL(string sFlag) { try { dtFirst = new DataTable(); dtFirst = CreateFirst(dtFirst); int tmp = 0; foreach (GridViewRow gvRow in GridViewGL.Rows) { if (((CheckBox)gvRow.FindControl("chk_3")).Checked == true) { dtFirst.Rows.Add(GridViewGL.DataKeys[gvRow.DataItemIndex].Value, ((Label)gvRow.FindControl("lblBrCd_3")).Text, ((Label)gvRow.FindControl("lblProduct_3")).Text); string[] AT = dtFirst.Rows[tmp]["ID"].ToString().Split('_'); ViewState["SUBGLCODE"] = AT[0].ToString(); Result = RO.InsertTrans_GL((((Label)gvRow.FindControl("lblBrCd_3")).Text), (((Label)gvRow.FindControl("lblProduct_3")).Text), ((TextBox)gvRow.FindControl("TxtGLCODE_3")).Text, ((TextBox)gvRow.FindControl("TxtGLName_3")).Text, ((TextBox)gvRow.FindControl("TxtGLGrp_3")).Text, ((TextBox)gvRow.FindControl("TxtCategory_3")).Text, ((TextBox)gvRow.FindControl("TxtROI_3")).Text, ((TextBox)gvRow.FindControl("TxtIntCalType_3")).Text, ((TextBox)gvRow.FindControl("TxtIntApp_3")).Text, ((TextBox)gvRow.FindControl("TxtINTPAY_3")).Text, ((TextBox)gvRow.FindControl("TxtGLBal_3")).Text, ((TextBox)gvRow.FindControl("TxtPLAcc_3")).Text, ((TextBox)gvRow.FindControl("TxtAccYN_3")).Text, ((TextBox)gvRow.FindControl("TxtLastNo_3")).Text, ((TextBox)gvRow.FindControl("TxtIR_3")).Text, ((TextBox)gvRow.FindControl("TxtIOR_3")).Text, ((TextBox)gvRow.FindControl("TxtIntAccYN_3")).Text, ((TextBox)gvRow.FindControl("TxtShortGlName_3")).Text, ((TextBox)gvRow.FindControl("TxtPLGrp_3")).Text, ((TextBox)gvRow.FindControl("TxtCashDR_3")).Text, ((TextBox)gvRow.FindControl("TxtCashCR_3")).Text, ((TextBox)gvRow.FindControl("TxtTrfDR_3")).Text, ((TextBox)gvRow.FindControl("TxtTrfCR_3")).Text, ((TextBox)gvRow.FindControl("TxtClgDR_3")).Text, ((TextBox)gvRow.FindControl("TxtClgCR_3")).Text, ((TextBox)gvRow.FindControl("TxtGLMarathi_3")).Text, ((TextBox)gvRow.FindControl("TxtImplimentDT_3")).Text, ((TextBox)gvRow.FindControl("TxtOpenBal_3")).Text); tmp++; } } if (Result > 0) { WebMsgBox.Show("Sucessfully Modify...!!", this.Page); GridViewGL.Visible = false; ClearData(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
private void CheckBillingType() { try { string strtype = ""; SqlProcsNew proc = new SqlProcsNew(); DataSet dsDT = proc.ExecuteSP("SP_BillingType"); if (dsDT.Tables[0].Rows.Count > 0) { strtype = dsDT.Tables[0].Rows[0]["BillingType"].ToString(); Session["MenuBillingType"] = strtype.ToString(); } dsDT.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
private void InsertData_loan(string sFlag) { try { dtFirst = new DataTable(); dtFirst = CreateFirst(dtFirst); int tmp = 0; foreach (GridViewRow gvRow in GridViewLoan.Rows) { if (((CheckBox)gvRow.FindControl("chk_1")).Checked == true) { dtFirst.Rows.Add(GridViewLoan.DataKeys[gvRow.DataItemIndex].Value, ((Label)gvRow.FindControl("lblBrCd_1")).Text, ((Label)gvRow.FindControl("lblProduct_1")).Text, ((Label)gvRow.FindControl("lblAccno_1")).Text); string[] AT = dtFirst.Rows[tmp]["ID"].ToString().Split('_'); ViewState["Custno"] = AT[0].ToString(); Result = RO.InsertTrans_loan((((Label)gvRow.FindControl("lblBrCd_1")).Text), (((Label)gvRow.FindControl("lblProduct_1")).Text), (((Label)gvRow.FindControl("lblAccno_1")).Text), ((TextBox)gvRow.FindControl("TxtCustno_1")).Text, ((TextBox)gvRow.FindControl("TxtLimit_1")).Text, ((TextBox)gvRow.FindControl("TxtInst_1")).Text, ((TextBox)gvRow.FindControl("TxtROI_1")).Text, ((TextBox)gvRow.FindControl("TxtPenal_1")).Text, ((TextBox)gvRow.FindControl("TxtOpDate_1")).Text, ((TextBox)gvRow.FindControl("TxtDueDt_1")).Text, ((TextBox)gvRow.FindControl("TxtStatus_1")).Text, ((TextBox)gvRow.FindControl("TxtInstDT_1")).Text, ((TextBox)gvRow.FindControl("TxtPERIOD_1")).Text, ((TextBox)gvRow.FindControl("TxtBONDNO_1")).Text, ((TextBox)gvRow.FindControl("TxtlastIntDt_1")).Text, ((TextBox)gvRow.FindControl("TxtDISYN_1")).Text, ((TextBox)gvRow.FindControl("TxtEMI_1")).Text, ((TextBox)gvRow.FindControl("TxtRecommAutho_1")).Text, ((TextBox)gvRow.FindControl("TxtEquated_1")).Text, ((TextBox)gvRow.FindControl("TxtIntFund_1")).Text, ((TextBox)gvRow.FindControl("TxtPLRLink_1")).Text, ((TextBox)gvRow.FindControl("TxtLoanPurpose_1")).Text, ((TextBox)gvRow.FindControl("TxtRemark_1")).Text, Session["MID"].ToString(), ((TextBox)gvRow.FindControl("TxtStage_1")).Text); tmp++; } } if (Result > 0) { WebMsgBox.Show("Sucessfully Modify...!!", this.Page); GridViewLoan.Visible = false; ClearData(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void ddlByName_SelectedIndexChanged(object sender, EventArgs e) { try { SqlProcsNew sqlobj = new SqlProcsNew(); DataSet dsFetchSE = new DataSet(); dsFetchSE = sqlobj.ExecuteSP("SP_GetDinerforDoors", new SqlParameter() { ParameterName = "@Date", SqlDbType = SqlDbType.DateTime, Value = dtpDiners.SelectedDate }, new SqlParameter() { ParameterName = "@SessionCode", SqlDbType = SqlDbType.NVarChar, Value = ddlDinersSession.SelectedValue }, new SqlParameter() { ParameterName = "@DoorNo", SqlDbType = SqlDbType.BigInt, Value = ddlByName.SelectedValue }); if (dsFetchSE.Tables[0].Rows.Count > 0) { ddlDiner.SelectedValue = dsFetchSE.Tables[0].Rows[0]["Booked"].ToString(); ddlGuest.SelectedValue = dsFetchSE.Tables[0].Rows[0]["GuestBooked"].ToString(); } rwDinersUpdate.Visible = true; } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
//Search By Name Product public DataSet Load_SearchProduct_ByName(int Category_ID) { try { DataSet dset = new DataSet(); string commandText = "SP_Get_ProductByCategory"; SqlCommand command = new SqlCommand(commandText, conn.Connect()); command.CommandType = CommandType.StoredProcedure; SqlParameter prCategory_ID = command.Parameters.Add("@Category_ID", SqlDbType.Int); prCategory_ID.Value = Category_ID; SqlDataAdapter adapter = new SqlDataAdapter(command); adapter.Fill(dset); return(dset); } catch (SqlException e) { WebMsgBox.Show(e.Message); } finally { conn.Close_Connection(); } return(null); }
private void loadsingleplant() { try { SqlDataReader dr = null; ddl_Plantcode.Items.Clear(); ddl_Plantname.Items.Clear(); txt_PlantPhoneNo.Items.Clear(); dr = Bllusers.LoadSinglePlantcode(ccode, pcode); if (dr.HasRows) { while (dr.Read()) { ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString()); ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString()); txt_PlantPhoneNo.Items.Add(dr["Mana_PhoneNo"].ToString()); } } } catch (Exception ex) { WebMsgBox.Show(ex.ToString()); } }
protected void txtProdType_TextChanged(object sender, EventArgs e) { try { sResult = SB.GetProduct(txtBrCode.Text.ToString(), txtProdType.Text.ToString()); if (sResult != null) { if (BD.GetProdOperate(txtBrCode.Text.ToString(), txtProdType.Text.ToString()).ToString() != "3") { string[] ACC = sResult.Split('_');; ViewState["GlCode"] = ACC[0].ToString(); txtProdName.Text = ACC[2].ToString(); txtAsOnDate.Focus(); } else { ClearProdText(); lblMessage.Text = "Product is not operating...!!"; ModalPopup.Show(this.Page); return; } } else { ClearProdText(); WebMsgBox.Show("Enter valid Product code!.....", this.Page); txtProdType.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void lbtUpdateB_Click(object sender, EventArgs e) { #region [TestInput] if (txtName.Text.Trim().Equals("")) { WebMsgBox.Show("Name not null !"); txtName.Focus(); return; } #endregion try { var obj = new TypeFilmInfo(); obj.TypId = txtId.Value; obj.NameT = txtName.Text; obj.Status = chkActive.Checked ? "1" : "0"; if (_insert == true) { TypeFilmService.TypeFilm_Insert(obj); } else { TypeFilmService.TypeFilm_Update(obj); } BindGrid(); LoadFilterNewsNameAutocomplete(); pnView.Visible = true; pnUpdate.Visible = false; _insert = false; } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void Status() { try { SqlProcsNew sqlobj = new SqlProcsNew(); DataSet ddlistStatus = new DataSet(); ddlistStatus = sqlobj.ExecuteSP("SP_FetchStatusDropDown", new SqlParameter() { ParameterName = "@IMODE", SqlDbType = SqlDbType.Int, Value = 2 }); ddlstatus.DataSource = ddlistStatus.Tables[0]; ddlstatus.DataValueField = "SCode"; ddlstatus.DataTextField = "SDescription"; ddlstatus.DataBind(); ddlstatus.Dispose(); ddlstatus.Items.Insert(0, new ListItem("--Select--", "0")); } catch (Exception ex) { WebMsgBox.Show(ex.Message.ToString()); } }
protected void opisanieGrupySkanow(object sender, EventArgs e) { List <string> wybrane = new List <string>(); //foreach (RepeaterItem ri in listaSkanow.Items) //{ // if ((ri.FindControl("cbDodajDoOpisu") as CheckBox).Checked) // { // wybrane.Add(Server.MapPath(Pemi.Esoda.Tools.Configuration.VirtualTemporaryDirectory + "/" + System.IO.Path.GetFileNameWithoutExtension((ri.FindControl("btnMiniatura") as ImageButton).CommandArgument.ToString()) + ".tif")); // } //} foreach (GridViewRow row in gvListSkanow.Rows) { if ((row.FindControl("cbDodajDoOpisu") as CheckBox).Checked) { wybrane.Add(Server.MapPath(Pemi.Esoda.Tools.Configuration.VirtualTemporaryDirectory + "/" + System.IO.Path.GetFileNameWithoutExtension((row.FindControl("btnMiniatura") as ImageButton).CommandArgument.ToString()) + ".tif")); } } if (wybrane.Count < 2) { WebMsgBox.Show(this, "¯eby dodaæ grupê trzeba zaznaczyæ co najmniej 2 skany!"); return; } opisywanieSkanu.Visible = true; isMainItem.Enabled = false; widokListy.Visible = false; widokSzczegolow.Visible = true; widokNawigacjiZalacznikow.Visible = true; wybraneDokumenty = wybrane.ToArray(); aktualnyDokument = 1; podepnijPodgladuDokumentu(wybrane[0]); }
private void LoadWorkTasks() { try { DataSet dsCategory = sqlobj.ExecuteSP("SP_LoadTasksMaster"); if (dsCategory.Tables[0].Rows.Count > 0) { gvWorkTasks.DataSource = dsCategory; gvWorkTasks.DataBind(); } else { gvWorkTasks.DataSource = string.Empty; gvWorkTasks.DataBind(); } dsCategory.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
public void getagentid() { try { ddl_Agentid.Items.Clear(); string connStr = ConfigurationManager.ConnectionStrings["AMPSConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(connStr); con.Open(); // string str = "select * from Agent_Master where plant_code='" + pcode + "' order by rand(agent_id) "; string str = "select distinct agent_id from agent_master where plant_code='" + pcode + "'"; SqlCommand cmd = new SqlCommand(str, con); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { ddl_Agentid.Items.Add(dr["agent_id"].ToString()); // txt_AgentName.Text = dr["Agent_Name"].ToString(); } } catch { WebMsgBox.Show("NO MILK"); } }