protected void btnSendSolicitor_Click(object sender, EventArgs e) { if (lbllnkTS.Text != "") { dbDocumentStatusData.villagecode = cmbVillage.SelectedValue.ToString(); dbDocumentStatusData.documentcode = "PTS"; dbDocumentStatusData.docno = cmbDocumentNo.SelectedValue.ToString(); dbDocumentStatusData.solicitorsentdate = DateTime.Today; dbDocumentStatusData.officename = "SO1"; bool UpdateSolicitr = dbDocumentStatusData.UpdateDocumentStatusApproval("HO"); if (UpdateSolicitr) { } else { //Send SMS SendSMS("1"); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Primary Title Search Report Sent to Head Office for Approval');", true); } } else { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Primary Title Search Report not Generated');", true); } }
protected void btnSubmitDoc_Click(object sender, EventArgs e) { bool UpdateSolicitr = false; if (cmbSelectClient.SelectedValue.ToString() != "") { dbDocumentStatusData.villagecode = cmbVillage.SelectedValue.ToString(); dbDocumentStatusData.docno = cmbDocumentNo.SelectedValue.ToString(); dbDocumentStatusData.solicitorsentdate = DateTime.Today; dbDocumentStatusData.officename = "HO"; //dsGetAllDocuments = dbDocumentStatusData.HO_GetDocFromSO(cmbVillage.SelectedValue.ToString(), cmbDocumentNo.SelectedValue.ToString(), "SO1"); // dsShowAllDocData = dbFamilyDetailsData.getSOOfficeDocument(cmbVillage.SelectedValue.ToString(), cmbDocumentNo.SelectedValue.ToString()); //if (dsGetAllDocuments.Tables[0].Rows.Count > 0) //{ foreach (GridViewRow row in grdSiteOfficeDocAll.Rows) { if (row.RowType == DataControlRowType.DataRow) { CheckBox chkRow = (row.Cells[0].FindControl("chkSelect") as CheckBox); if (chkRow.Checked) { string name = row.Cells[1].Text; // string country = (row.Cells[2].FindControl("lblCountry") as Label).Text; // dt.Rows.Add(name, country); string DocumentCode = row.Cells[2].Text; dbDocumentStatusData.documentcode = DocumentCode; dbDocumentStatusData.solicitorapproval = "No"; if (cmbSelectClient.SelectedValue.ToString() == "Solicitor") { UpdateSolicitr = dbDocumentStatusData.UpdateDocumentStatusApproval("Solicitor"); } else { UpdateSolicitr = dbDocumentStatusData.UpdateDocumentStatusApproval("Client"); } } } } //foreach (DataRow rows in dsGetAllDocuments.Tables[0].Rows) //{ // string DocumentCode = rows["documentcode"].ToString(); // dbDocumentStatusData.documentcode = DocumentCode; // if (cmbSelectClient.SelectedValue.ToString() == "Solicitor") // { // UpdateSolicitr = dbDocumentStatusData.UpdateDocumentStatusApproval("Solicitor"); // } // else // { // UpdateSolicitr = dbDocumentStatusData.UpdateDocumentStatusApproval("Client"); // } //} // For Each End //} //If End //End For Loop if (UpdateSolicitr) { } else { //Send SMS SendSMS("1"); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Document sent for Approval');", true); dsGetAllDocuments = dbDocumentStatusData.HO_GetDocFromSO(cmbVillage.SelectedValue.ToString(), cmbDocumentNo.SelectedValue.ToString(), "SO1"); if (dsGetAllDocuments.Tables[0].Rows.Count > 0) { grdSiteOfficeDocAll.DataSource = dsGetAllDocuments; grdSiteOfficeDocAll.DataBind(); } else { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Documents not Generated ');", true); } } } else { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Enable to Send Document for Approval');", true); } }