protected void TXTKTO_TextChanged(object sender, EventArgs e) { try { TXTKTO.Text = TOSTRING + TXTKTO.Text.ToString(); TXTKTO.Text = TXTKTO.Text.ToString().Replace(",,", ","); MDPopUpYesNoMail2.Show(); BtnPopMail2.Focus(); } catch (Exception ex) { } }
protected void ReportGrid_RowCommand(object sender, GridViewCommandEventArgs e) { try { switch (e.CommandName) { //case ("Select"): // { // ViewState["EditID"] = Convert.ToInt32(e.CommandArgument); // DsEdit = Obj_PurchaseOrder.GetPOForEdit(Convert.ToInt32(e.CommandArgument), out StrError); // if (DsEdit.Tables.Count > 0) // { // if (DsEdit.Tables[0].Rows.Count > 0) // { // //DtEditPO = DsEdit.Tables["Table"]; // //GrdReqPO.DataSource = DsEdit.Tables[0]; // //GrdReqPO.DataBind();//GrdReqPO // //for (int r = 0; r < GrdReqPO.Rows.Count; r++) // //{ // // // ((DropDownList)GrdReqPO.Rows[r].FindControl("GrdddlVendor")).Enabled = false; // //} // } // if (DsEdit.Tables[1].Rows.Count > 0) // { // DtEditPO = DsEdit.Tables["Table1"]; // ViewState["PurchaseOrder"] = DtEditPO;//PurchaseOrderDtls old viewstate // ViewState["PurchaseOrder1"] = DtEditPO;//PurchaseOrderDtls old viewstate // // ViewState["GridIndex"] = DtEditPO; // PurOrderGrid.DataSource = DsEdit.Tables[1]; // PurOrderGrid.DataBind(); // } // if (DsEdit.Tables[2].Rows.Count > 0) // { // DtEditPO = DsEdit.Tables["Table2"]; // ViewState["TermsTable"] = DtEditPO;//PurchaseOrderDtls old viewstate // GridTermCond.DataSource = DsEdit.Tables[2]; // GridTermCond.DataBind(); // for (int i = 0; i < GridTermCond.Rows.Count; i++) // { // ((CheckBox)GridTermCond.Rows[i].Cells[1].FindControl("GrdSelectAll")).Checked = true; // GridTermCond.Rows[i].BackColor = System.Drawing.ColorTranslator.FromHtml("#F2FFF8"); // } // } // if (DsEdit.Tables[3].Rows.Count > 0) // { // ddlCompany.SelectedValue = DsEdit.Tables[3].Rows[0]["CompanyID"].ToString(); // txtDekhrekhAmt.Text = DsEdit.Tables[3].Rows[0]["DekhrekhAmt"].ToString(); // txtHamaliAmt.Text = DsEdit.Tables[3].Rows[0]["HamaliAmt"].ToString(); // txtCESSAmt.Text = DsEdit.Tables[3].Rows[0]["CESSAmt"].ToString(); // txtFreightAmt.Text = DsEdit.Tables[3].Rows[0]["FreightAmt"].ToString(); // txtPackingAmt.Text = DsEdit.Tables[3].Rows[0]["PackingAmt"].ToString(); // txtPostageAmt.Text = DsEdit.Tables[3].Rows[0]["PostageAmt"].ToString(); // txtOtherCharges.Text = DsEdit.Tables[3].Rows[0]["OtherCharges"].ToString(); // RdoPaymentDays.SelectedValue = DsEdit.Tables[3].Rows[0]["PaymentTerms"].ToString(); // TXTPOQTNO.Text = DsEdit.Tables[3].Rows[0]["POQTNO"].ToString(); // TXTPOQTDATE.Text = DsEdit.Tables[3].Rows[0]["POQTDATE"].ToString(); // txtSerTax.Text = DsEdit.Tables[3].Rows[0]["ServiceTaxAmt"].ToString(); // DDLSERVICETAX.Items.FindByText(DsEdit.Tables[3].Rows[0]["ServiceTaxPer"].ToString()).Selected = true; // TXTNARRATION.Text = DsEdit.Tables[3].Rows[0]["Instruction"].ToString(); // txtGrandTotal.Text = DsEdit.Tables[3].Rows[0]["GrandTotal"].ToString(); // txtInstallationRemark.Text = DsEdit.Tables[3].Rows[0]["InstallationRemark"].ToString(); // txtInstallationCharge.Text = DsEdit.Tables[3].Rows[0]["InstallationCharge"].ToString(); // txtInstallationServicetax.Text = DsEdit.Tables[3].Rows[0]["InstallationSerTaxPer"].ToString(); // txtInstallationServiceAmount.Text = DsEdit.Tables[3].Rows[0]["InstallationSerTaxAmt"].ToString(); // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["HamaliActual"].ToString()) == 1) // { // CHKHAMALI.Checked = true; // } // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["HamaliActual"].ToString()) == 0) // { // CHKHAMALI.Checked = false; // } // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["FreightActual"].ToString()) == 1) // { // CHKFreightAmt.Checked = true; // } // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["FreightActual"].ToString()) == 0) // { // CHKFreightAmt.Checked = false; // } // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["OtherChargeActual"].ToString()) == 1) // { // CHKOtherCharges.Checked = true; // } // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["OtherChargeActual"].ToString()) == 0) // { // CHKOtherCharges.Checked = false; // } // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["LoadingActual"].ToString()) == 1) // { // CHKLoading.Checked = true; // } // if (Convert.ToInt32(DsEdit.Tables[3].Rows[0]["LoadingActual"].ToString()) == 0) // { // CHKLoading.Checked = false; // } // txtexcisedutyper.Text = DsEdit.Tables[3].Rows[0]["ExcisePer"].ToString(); // txtexciseduty.Text = DsEdit.Tables[3].Rows[0]["ExciseAmount"].ToString(); // } // BtnSave.Visible = false; // BtnUpdate.Visible = true; // } // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOP", "javascript:HidePOP();", true); // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOPTERMS", "javascript:HidePOPTermsPOSupplier();", true); // } // break; //case ("Delete"): // { // int Deleteid = Convert.ToInt32(e.CommandArgument); // Entity_PurchaseOrder.POId = Deleteid; // Entity_PurchaseOrder.UserId = Convert.ToInt32(Session["UserId"]); // Entity_PurchaseOrder.LoginDate = Convert.ToDateTime(DateTime.Now.ToShortDateString()); // int DeleteDetails = Obj_PurchaseOrder.Delete_PurchaseOrder(ref Entity_PurchaseOrder, out StrError); // if (DeleteDetails > 0) // { // obj_Comman.ShowPopUpMsg("Record Deleted Successfully", this.Page); // MakeEmptyForm(); // } // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOP", "javascript:HidePOP();", true); // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOPTERMS", "javascript:HidePOPTermsPOSupplier();", true); // } // break; //case ("Email"): // { // int Mailid = Convert.ToInt32(e.CommandArgument); // int status = 1;// SendMail(Mailid, 1); // if (status == 1) // { // int GETUPDATES1 = Obj_PurchaseOrder.UpdateInsert_PurchseOrderMAIL(Convert.ToInt32(Mailid), out StrError); // } // MakeEmptyForm(); // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOP", "javascript:HidePOP();", true); // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOPTERMS", "javascript:HidePOPTermsPOSupplier();", true); // } // break; //case ("CANCELAUTHPO"): // { // int CurrRow = Convert.ToInt32(e.CommandArgument); // //int RequisitnId = Convert.ToInt32(Convert.ToInt32(((Label)ReportGrid.Rows[CurrRow].FindControl("LblEntryId")).Text)); // BindPurchaseOrderFORCANCELPOPUP(CurrRow); // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOPTERMS", "javascript:HidePOPTermsPOSupplier();", true); // ScriptManager.RegisterStartupScript(this, GetType(), "ShowPOP", "javascript:ShowPOP();", true); // } // break; case ("MailPO"): { TRLOADING.Visible = false; ViewState["MailID"] = Convert.ToInt32(e.CommandArgument); GETDATAFORMAIL(1, 1); MDPopUpYesNoMail2.Show(); BtnPopMail2.Focus(); } break; } } catch (Exception ex) { } }