protected void TXTKTO_TextChanged(object sender, EventArgs e) { try { TXTKTO.Text = TOSTRING + TXTKTO.Text.ToString(); TXTKTO.Text = TXTKTO.Text.ToString().Replace(",,", ","); MDPopUpYesNoMail.Show(); BtnPopMail1.Focus(); } catch (Exception ex) { } }
protected void DDLKCMPY_SelectedIndexChanged(object sender, EventArgs e) { try { if (Convert.ToInt32(DDLKCMPY.SelectedValue.ToString()) > 0) { //GETCLIENTPDF(Convert.ToInt32(LBLID.Text.ToString()), Convert.ToInt32(DDLKCMPY.SelectedValue.ToString())); MDPopUpYesNoMail.Show(); BtnPopMail1.Focus(); } } catch (Exception ex) { } finally { } }
protected void BtnMail_Click(object sender, EventArgs e) { GETDATAFORMAIL(1, 1, 0); MDPopUpYesNoMail.Show(); BtnPopMail.Focus(); }
protected void ReportGrid_RowCommand(object sender, GridViewCommandEventArgs e) { try { switch (e.CommandName) { //case ("Select"): // { // ViewState["EditID"] = Convert.ToInt32(e.CommandArgument); // Ds = Obj_RequisitionCafeteria.GetRequisitionDetailsForEdit(Convert.ToInt32(e.CommandArgument), out StrError); // if (Ds.Tables.Count > 0) // { // if (Ds.Tables[0].Rows.Count > 0) // { // txtReqNo.Text = Ds.Tables[0].Rows[0]["RequisitionNo"].ToString(); // lblReqNo.Text = Ds.Tables[0].Rows[0]["RequisitionNo"].ToString(); // txtReqDate.Text = Ds.Tables[0].Rows[0]["RequisitionDate"].ToString(); // lblCafe.Text = Ds.Tables[0].Rows[0]["Cafeteria"].ToString(); // txtTempDate.Text = Ds.Tables[0].Rows[0]["ExpdDate"].ToString(); // ddlCostCentre.SelectedValue = Ds.Tables[0].Rows[0]["IsCostCentre"].ToString(); // TXTREMARK.Text = Ds.Tables[0].Rows[0]["Remark"].ToString(); // txtindremark.Text = Ds.Tables[0].Rows[0]["RemarkIND"].ToString(); // } // if (Ds.Tables[1].Rows.Count > 0) // { // ViewState["Template"] = Ds.Tables[1]; // ViewState["Requisition"] = Ds.Tables[1]; // ViewState["TemplateDetails"] = Ds.Tables[1]; // GrdRequisition.DataSource = Ds.Tables[1]; // GrdRequisition.DataBind(); // GetItemForEdit(); // CalculateToTotal(); // for (int t = 0; t < GrdRequisition.Rows.Count; t++) // { // ((CheckBox)GrdRequisition.Rows[t].Cells[0].FindControl("GrdSelectAll")).Checked = true; // } // EditTemp = 0; // BtnUpdate.Visible = true; // BtnSave.Visible = false; // } // else // { // SetInitialRow_GrdRequisition(); // } // } // } // break; //case ("Delete"): // { // ViewState["DeleteID"] = Convert.ToInt32(e.CommandArgument); // Entity_RequisitionCafeteria.RequisitionCafeId = Convert.ToInt32(e.CommandArgument); // Entity_RequisitionCafeteria.UserId = Convert.ToInt32(Session["UserId"]); // Entity_RequisitionCafeteria.LoginDate = Convert.ToDateTime(DateTime.Now.ToShortDateString()); // int DeletedRow = Obj_RequisitionCafeteria.DeleteRequisition(ref Entity_RequisitionCafeteria, out StrError); // if (DeletedRow != 0) // { // obj_Comman.ShowPopUpMsg("Record Deleted Successfully!", this.Page); // MakeEmptyForm(); // } // } // break; //case ("DeleteMR"): // { // ViewState["DeleteID"] = Convert.ToInt32(e.CommandArgument); // Entity_RequisitionCafeteria.RequisitionCafeId = Convert.ToInt32(e.CommandArgument); // Entity_RequisitionCafeteria.UserId = Convert.ToInt32(Session["UserId"]); // Entity_RequisitionCafeteria.LoginDate = Convert.ToDateTime(DateTime.Now.ToShortDateString()); // int DeletedRow = Obj_RequisitionCafeteria.DeleteRequisition(ref Entity_RequisitionCafeteria, out StrError); // if (DeletedRow != 0) // { // obj_Comman.ShowPopUpMsg("Record Deleted Successfully!", this.Page); // MakeEmptyForm(); // } // } // break; case ("MailIndent"): { TRLOADING.Visible = false; ViewState["MailID"] = Convert.ToInt32(e.CommandArgument); GETDATAFORMAIL(1, 1); MDPopUpYesNoMail.Show(); BtnPopMail1.Focus(); } break; } } catch (Exception ex) { } }
protected void GrdReport_ItemCommand(object source, RepeaterCommandEventArgs e) { try { switch (e.CommandName) { case ("Select"): { if (Convert.ToInt32(e.CommandArgument) != 0) { BtnSave.Visible = false; BtnDelete.Visible = true; BtnMail.Visible = BtnUpdate.Visible = true; ViewState["EditID"] = Convert.ToInt32(e.CommandArgument); Ds = Obj_CCMaster.GetItemForEdit(Convert.ToInt32(e.CommandArgument), out StrError); if (Ds.Tables.Count > 0 && Ds.Tables[0].Rows.Count > 0) { TxtCompanyName.Text = Ds.Tables[0].Rows[0]["Name"].ToString(); TxtSupplierFor.Text = Ds.Tables[0].Rows[0]["SupplierFor"].ToString(); TxtAddress.Text = Ds.Tables[0].Rows[0]["Address"].ToString(); TxtWebsite.Text = Ds.Tables[0].Rows[0]["WebSite"].ToString(); TxtRemark.Text = Ds.Tables[0].Rows[0]["Remark"].ToString(); TxtCompanyName.Focus(); } else { setInitialRow(); EmptyFormFields(); } if (Ds.Tables[1].Rows.Count > 0) { ViewState["CurrentTable"] = Ds.Tables[1]; GridDetails.DataSource = Ds.Tables[1]; GridDetails.DataBind(); //TxtPersonName.Focus(); } else { setInitialRow(); //EmptyFormFields(); } } break; } case ("MAIL"): { GETDATAFORMAIL(2, Convert.ToInt32(e.CommandArgument), 0); MDPopUpYesNoMail.Show(); BtnPopMail.Focus(); break; } case ("MAILDetails"): { GETDATAFORMAIL(2, Convert.ToInt32(e.CommandArgument), 1); MDPopUpYesNoMail.Show(); BtnPopMail.Focus(); break; } } } catch (Exception ex) { throw new Exception(ex.Message); } }