protected void btnsubmit_Click(object sender, EventArgs e) { try { string[] param = new string[10]; param[0] = "Request_ID"; param[1] = txtrequestno.Text; param[2] = "Assigned_To_Developer"; param[3] = ddldevelpoer.SelectedValue; param[4] = "Remark"; param[5] = txtremark.Text; param[6] = "Started_Date"; param[7] = txtstartdate.Text; param[8] = "End_Date"; param[9] = txtenddate.Text; int rowaffected = CommanDataLoad.ExecuteNonQuery("Usp_Update_Assign_Developer_Request", "1", "Sw_Request_Assigin_To_Developer", param); if (rowaffected > 0) { Response.Write("<script>alert('Request Id: " + txtrequestno.Text + " Assign to Developer Successfully.');</script>"); } } catch (Exception ex) { lblmsg.Visible = true; lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { try { string[] param = new string[12]; param[0] = "Request_Id"; param[1] = txtrequestno.Text; param[2] = "Remark"; param[3] = txtremark.Text; param[4] = "HOD_Approve_Flag"; param[5] = ddlapprove.SelectedValue; param[6] = "Update_IpAddress"; param[7] = Request.UserHostAddress; param[8] = "Update_UserId"; param[9] = Request.Cookies["UserId"].Value.ToString(); //param[9] = "122"; param[10] = "Update_by"; param[11] = Request.Cookies["UserName"].Value.ToString(); //param[11] = "p.n.Shetty"; int rowaffected = CommanDataLoad.ExecuteNonQuery("Usp_Update_Authority_Approval", "1", "Approve_Request_By_HOD", param); if (rowaffected > 0) { Response.Write("<script>alert('Request Id: " + txtrequestno.Text + " Approved Successfully.');</script>"); } } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { try { string[] param = new string[6]; param[0] = "Department_Name"; param[1] = Department_Name.Text; param[2] = "ip"; param[3] = ClsConnection.StrIP; param[4] = "UserId"; param[5] = ClsConnection.Userid; int rowaffected = CommanDataLoad.ExecuteNonQuery("Usp_insert_Department_Master", "1", "Department Master", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Saved Successfully.');</script>"); BindGrid(); } ClearControls(); BindGrid(); } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); //Console.WriteLine("Some ERROR" + ex.Message.ToString()); } }
public static void DeleteData(string prefix) { string[] param1 = new string[2]; param1[0] = "str"; param1[1] = prefix; int a = CommanDataLoad.ExecuteNonQuery("sp_delete_lead_data", "1", "Manage Lead", param1); }
protected void btnSubmit_Click(object sender, EventArgs e) { try { string[] param = new string[8]; param[0] = "source_name"; param[1] = txtsource.Text; param[2] = "Is_Active"; if (chkIsActive.Checked == true) { param[3] = "Y"; } else { param[3] = "N"; } param[4] = "UserId"; param[5] = ClsConnection.Userid; param[6] = "Ip_Addr"; param[7] = ClsConnection.StrIP; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Insert_Source", "1", "Source Master", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Saved Successfully.');</script>"); } Load_Grid(); ClearControls(); } catch (Exception ex) { //lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { try { if (txtbreakname.Text == "") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Please enter Break Type')", true); return; } if (ddltime.SelectedItem.Text == "--Select Time--") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Please Select Time')", true); return; } if (chkactive.Checked == true) { isactive = "1"; } else { isactive = "0"; } DateTime localdate = DateTime.Now; string[] param = new string[12]; param[0] = "Break_Type"; param[1] = txtbreakname.Text; param[2] = "Time"; param[3] = ddltime.SelectedValue; param[4] = "Is_Active"; param[5] = isactive; param[6] = "Created_on"; param[7] = string.Format("{0:s}", localdate); param[8] = "userid"; param[9] = ClsConnection.Userid; param[10] = "ip"; param[11] = ClsConnection.StrIP; int rowaffected = CommanDataLoad.ExecuteNonQuery("SpInsBreak_Master", "1", "Break_Master", param); if (rowaffected > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Saved Successfully')", true); BindGrid(); } ClearControls(); } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Some Error' + ex.Message.ToString();)", true); } }
public static void DeleteData(string prefix) { string[] param1 = new string[2]; param1[0] = "str"; param1[1] = prefix; int a = CommanDataLoad.ExecuteNonQuery("USP_Delete_Lead_Telecaller", "1", "Lead Assign Telecaller New", param1); }
protected void btnsubmit_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = CommanDataLoad.ExecuteDataSet("Select * from usr_login where UserId='" + HttpContext.Current.Session["UserId"] + "'", "2", "Change_password", ""); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { string str1 = CommanDataLoad.DecryptPassword(Convert.ToString(ds.Tables[0].Rows[0]["pass"].ToString())); if (txtOldPassword.Text == str1) { if (txtNewPassword.Text == txtConfirmPassword.Text) { string str = "update usr_login set pass='******' where UserId='" + HttpContext.Current.Session["UserId"] + "'"; CommanDataLoad.ExecuteNonQuery(str, "2", "Change Pass", ""); Lblmessage.Text = "Your Password Changed Successfully...!!!"; Response.Redirect("Default.aspx?msg=Password changed successfully...!"); } } else { Lblmessage.Text = "Please enter correct current password...!!!, Please login now with new password..!"; } } } }
protected void Button1_Click(object sender, EventArgs e) { string strDump = ""; int i = 0; int j = 0; strDump = "delete from usergroup where userid=" + ddluser.SelectedValue + ";"; j = 0; while (j < chk.Items.Count) { if (chk.Items[j].Selected == true) { strDump = strDump + "Insert into usergroup (userid,Groupid,eUserId,ip,sysdate)"; strDump = strDump + "values(" + ddluser.SelectedValue + "," + chk.Items[j].Value + "," + CommanDataLoad.UserId + ",'" + Request.UserHostAddress + "',getdate());"; } j = j + 1; } int rowaffected = CommanDataLoad.ExecuteNonQuery(strDump, "2", "Group Rights Item", ""); if (rowaffected > 0) { Response.Write("<script>alert('Record Inserted Successfully.');</script>"); } else { Response.Write("<script>alert('Technical error Please contact RupeeBoss Development Team');</script>"); } }
protected void Button2_Click(object sender, EventArgs e) { try { string[] param = new string[8]; param[0] = "Designation_Name"; param[1] = txtDesignation.Text; param[2] = "ip"; param[3] = ClsConnection.StrIP; param[4] = "userid"; param[5] = ClsConnection.Userid; param[6] = "desigid"; param[7] = lblid.Text; int rowaffected = CommanDataLoad.ExecuteNonQuery("usp_Designation_Master_Insert", "1", "Designation_Master", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Saved Successfully.');</script>"); } BindGrid(); ClearControls(); } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); //Console.WriteLine("Some ERROR" + ex.Message.ToString()); } }
protected void btndelete_Click(object sender, EventArgs e) { int cnt = 0; for (int i = 0; i < dglead.Rows.Count; i++) { // Access the CheckBox CheckBox cb = (CheckBox)dglead.Rows[i].FindControl("chkselect"); if (cb.Checked == true) { cnt = cnt + 1; int rowaffected = CommanDataLoad.ExecuteNonQuery("update lead_data set Is_Delete='Y' where lead_id=" + dglead.Rows[i].Cells[1].Text + "", "0", "Lead Assing Telecaller", ""); } } if (cnt == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Please Select at least one Lead to Delete..')", true); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Saved Successfully')", true); BindGrid(); } }
protected void btnUpdate_Click(object sender, EventArgs e) { try { string[] param = new string[14]; param[0] = "Menu_Id"; param[1] = lblMenuId.Text; param[2] = "Menu_Sequence"; param[3] = ddlMenuSequence.SelectedValue; param[4] = "Menu_Type"; param[5] = ddlMenuType.SelectedValue; param[6] = "Menu_Action"; param[7] = txtlink.Text; param[8] = "Menu_Display"; param[9] = txtmenudisplay.Text; param[10] = "Ip"; param[11] = ClsConnection.StrIP; param[12] = "Userid"; param[13] = ClsConnection.Userid; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Update_Menu", "1", "Menu Edit", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Updated Successfully.');</script>"); } Popup(false); Load_Grid(); ClearControls(); } catch (Exception ex) { //lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void update_data() { try { string[] param = new string[8]; param[0] = "Message_Id"; param[1] = lblid.Text; param[2] = "messageTitle"; param[3] = txtMessage.Text; param[4] = "messageBody"; param[5] = TextArea1.Text; param[6] = "Is_Active"; if (Active.Checked == true) { param[7] = "1"; } else { param[7] = "0"; } int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Update_message_Master", "1", "Message_Master", param); if (rowaffected > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record updated Successfully')", true); ClearControls(); BindGrid(); } } catch (Exception ex) { } }
protected void Update_Data() { try { string[] param = new string[16]; param[0] = "Broker_Id"; param[1] = lblBrokerId.Text; param[2] = "Broker_Name"; param[3] = txtBrokerName.Text; param[4] = "Contact_No"; param[5] = txtContactNo.Text; param[6] = "PAN_No"; param[7] = txtPANNo.Text; param[8] = "Emp_Code"; param[9] = ddlEmp.SelectedValue; param[10] = "UserId"; param[11] = ClsConnection.Userid; param[12] = "Ip_address"; param[13] = ClsConnection.StrIP; param[14] = "Email_Id"; param[15] = txtEmailid.Text; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Update_Broker_Master", "1", "Broker Master", param); int UpdateRowChild = 0; if (rowaffected > 0) { int i = 0; while (i < gvbpchild.Rows.Count) { CheckBox chk = (CheckBox)gvbpchild.Rows[i].FindControl("chk"); if (chk.Checked == true) { TextBox txtPayout = (TextBox)gvbpchild.Rows[i].FindControl("txtPayoutper"); string[] param1 = new string[6]; param1[0] = "Broker_Id"; param1[1] = lblBrokerId.Text; param1[2] = "Product_Id"; param1[3] = gvbpchild.Rows[i].Cells[1].Text; param1[4] = "PayoutPer"; param1[5] = txtPayout.Text; UpdateRowChild = CommanDataLoad.ExecuteNonQuery("USP_Insert_BrokerProductMapping", "1", "Broker Master", param1); } i = i + 1; } if (UpdateRowChild > 0) { Response.Write("<script>alert('Record Updated Successfully.');</script>"); } } Popup(false); BindGrid(); Load_Grid(); ClearControls(); } catch (Exception ex) { //lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
public static void UpdateData(string prefix, string emp_code) { string[] param = new string[4]; param[0] = "str"; param[1] = prefix; param[2] = "emp_code"; param[3] = emp_code; int a = CommanDataLoad.ExecuteNonQuery("USP_Update_Lead_Telecaller", "1", "Lead Assign Telecaller New", param); }
protected void Submit_Click(object sender, ImageClickEventArgs e) { if (CheckField()) { try { string[] param = new string[26]; param[0] = "name"; param[1] = Name.Text; param[2] = "ip"; param[3] = ClsConnection.StrIP; param[4] = "UserId"; param[5] = ClsConnection.Userid; param[6] = "mobile"; param[7] = txtMobile.Text; param[8] = "email"; param[9] = txtEmailId.Text; param[10] = "montlyincome"; param[11] = txtIncome.Text; param[12] = "dob"; param[13] = txtDob.Text.Trim() != "" ? CommonValidation.GetYYYY_MM_DD(txtDob.Text) : ""; param[14] = "pan"; param[15] = txtPan.Text; param[16] = "add1"; param[17] = txtAddress.Text; param[18] = "cityid"; param[19] = ddlCity.SelectedValue; param[20] = "stateid"; param[21] = ddlState.SelectedValue; param[22] = "profession"; param[23] = ddlProfession.SelectedValue; param[24] = "productid"; param[25] = ddlProduct.SelectedValue; int rowaffected = CommanDataLoad.ExecuteNonQuery("Insert_Lead", "1", "", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Saved Successfully.');</script>"); // BindGrid(); } //ClearControls(); //GridView1.DataBind(); } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); //Console.WriteLine("Some ERROR" + ex.Message.ToString()); } } }
protected void btnsubmit_Click(object sender, EventArgs e) { try { string[] Param = new string[20]; Param[0] = "Module_Name"; Param[1] = cbmodule.SelectedValue; Param[2] = "Menu_Name"; Param[3] = txtMenuName.Text; Param[4] = "Menu_Parent"; if (ddlParentName.SelectedValue == "-1") { Param[5] = ""; } else { Param[5] = ddlParentName.SelectedValue; } Param[6] = "Menu_Level"; Param[7] = ddlMenuLevel.SelectedValue; Param[8] = "Menu_Sequence"; Param[9] = ddlMenuSequence.SelectedValue; Param[10] = "Menu_Type"; Param[11] = ddlMenuType.SelectedValue; Param[12] = "ip"; Param[13] = ClsConnection.StrIP; Param[14] = "userid"; Param[15] = ClsConnection.Userid; Param[16] = "Menu_Action"; Param[17] = txtlink.Text; Param[18] = "Menu_Display"; Param[19] = txtmenudisplay.Text; lblmsg.Text = ""; int rowAffected = CommanDataLoad.ExecuteNonQuery("USP_Menu_Master_Insert", "1", "Menu Master", Param); if (rowAffected > 0) { Response.Write("<script>alert('Data Saved Succesfully');</script>"); } ClearControls(); Load_Parent(); } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); //Console.WriteLine("Some ERROR" + ex.Message.ToString()); } }
protected void btnsubmit_Click(object sender, EventArgs e) { if (Session["checkExits"] == null || Session["checkExits"].ToString() == "") { if (txtMessage.Text != "" && TextArea1.Text != "") { string[] param = new string[12]; param[0] = "messageTitle"; param[1] = txtMessage.Text; param[2] = "messageBody"; param[3] = TextArea1.Text; param[4] = "is_Active"; if (Active.Checked == true) { param[5] = "1"; } else { param[5] = "0"; } param[6] = "IP_address"; param[7] = ClsConnection.StrIP; param[8] = "UserId"; param[9] = ClsConnection.Userid; param[10] = "MessageId"; param[11] = lblid.Text; int rowaffected = CommanDataLoad.ExecuteNonQuery("usp_insert_message_Master", "1", "Message_Master", param); if (rowaffected > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Saved Successfully')", true); ClearControls(); BindGrid(); } } } else { //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Please Enter Values In Data field ')", true); //ClearControls(); update_data(); } // ClearControls(); Session["checkExits"] = ""; }
protected int DirectWebsiteLead(string CName, string MobileNo, string Email, string CityId, string Profession, string Product_Id, string MonthlyIncome) { int result = 0; try { string[] param = new string[14]; param[0] = "CName"; param[1] = CName; param[2] = "MobileNo"; param[3] = MobileNo; param[4] = "City_Id"; param[5] = CityId; param[6] = "Email"; param[7] = Email; param[8] = "Profession"; param[9] = Profession; param[10] = "MonthlyIncome"; param[11] = MonthlyIncome; param[12] = "Product_Id"; param[13] = Product_Id; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Insert_LeadRawData_Website", "1", "Customer Web Request", param); if (rowaffected > 0) { //Response.Write("<script>alert('Record Insert Successfully.');</script>"); result = 1; Response.Write(result); } else { result = 0; Response.Write(result); } return(result); } catch (Exception ex) { result = 0; //lblmsg.Text = "Some Error" + ex.Message.ToString(); } return(result); }
protected void Update_Data() { try { string[] param = new string[24]; param[0] = "Map_Id"; param[1] = lblMapId.Text; param[2] = "Bank_Id"; param[3] = ddlbName.SelectedValue; param[4] = "City_Id"; param[5] = ddlcName.SelectedValue; param[6] = "Product_Id"; param[7] = ddlpName.SelectedValue; param[8] = "Contact_Person"; param[9] = txtcPerson.Text; param[10] = "Designation"; param[11] = txtDesign.Text; param[12] = "Mobile_No"; param[13] = txtmNo.Text; param[14] = "Landline_No"; param[15] = txtlandNo.Text; param[16] = "Fax_No"; param[17] = txtfNo.Text; param[18] = "Email_Id"; param[19] = txteId.Text; param[20] = "Userid"; param[21] = ClsConnection.Userid; param[22] = "Ip_Addr"; param[23] = ClsConnection.StrIP; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Update_Bank_Product_Mapping", "1", "Edit Bank Product Mapping", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Updated Successfully.');</script>"); } Popup(false); Load_Grid(); ClearControls(); } catch (Exception ex) { //lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { string strDump = ""; int i = 0; int j = 0; strDump = "delete from group_rights where groupid=" + ddlgroup.SelectedValue + ";"; while (i < TreeView1.Nodes.Count) { if (TreeView1.Nodes[i].Checked == true) { strDump = strDump + "Insert into Group_Rights (Menu_ID,Groupid,UserId,ip,sysdate)"; strDump = strDump + "values(" + TreeView1.Nodes[i].Value + "," + ddlgroup.SelectedValue + "," + CommanDataLoad.UserId + ",'" + Request.UserHostAddress + "',getdate());"; } j = 0; while (j < TreeView1.Nodes[i].ChildNodes.Count) { if (TreeView1.Nodes[i].ChildNodes[j].Checked == true) { strDump = strDump + "Insert into Group_Rights (Menu_ID,Groupid,UserId,ip,sysdate)"; strDump = strDump + "values(" + TreeView1.Nodes[i].ChildNodes[j].Value + "," + ddlgroup.SelectedValue + "," + CommanDataLoad.UserId + ",'" + Request.UserHostAddress + "',getdate());"; } j = j + 1; } i = i + 1; } int rowaffected = CommanDataLoad.ExecuteNonQuery(strDump, "2", "Group Rights Item", ""); if (rowaffected > 0) { Response.Write("<script>alert('Record Inserted Successfully.');</script>"); } else { Response.Write("<script>alert('Technical error Please contact CS Development Team');</script>"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { string[] param = new string[22]; param[0] = "Bank_Id"; param[1] = ddlBank.SelectedValue; param[2] = "City_Id"; param[3] = ddlCity.SelectedValue; param[4] = "Product_Id"; param[5] = ddlProduct.SelectedValue; param[6] = "Contact_Person"; param[7] = txtContactPerson.Text; param[8] = "Designation"; param[9] = txtDesignation.Text; param[10] = "Mobile_No"; param[11] = txtMobileNo.Text; param[12] = "Landline_No"; param[13] = txtLandlineNo.Text; param[14] = "Fax_No"; param[15] = txtFaxNo.Text; param[16] = "Email_Id"; param[17] = txtEmailId.Text; param[18] = "UserId"; param[19] = ClsConnection.Userid; param[20] = "Ip_Addr"; param[21] = ClsConnection.StrIP; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Insert_Bank_Product_Mapping", "1", "Bank Product Mapping", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Saved Successfully.');</script>"); } Load_Grid(); ClearControls(); } catch (Exception ex) { //lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { if (txtname.Text != "" && txtemail.Text != "" && txtmobile.Text != "" && txtremark.Text != "") { string[] param = new string[8]; param[0] = "name"; param[1] = txtname.Text; param[2] = "email"; param[3] = txtemail.Text; param[4] = "mobile"; param[5] = txtmobile.Text; param[6] = "Remark"; param[7] = txtremark.Text; int rowaffected = CommanDataLoad.ExecuteNonQuery("usp_insert_lead_Master", "1", "Lead_Capture_Master", param); if (rowaffected > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Saved Successfully')", true); ClearControls(); } } }
protected void Update_Data() { try { string[] param = new string[12]; param[0] = "Sub_Division_Id"; param[1] = lblSubDivisionId.Text; param[2] = "Division_Id"; param[3] = ddlDiv.SelectedValue; param[4] = "Sub_Division_Name"; param[5] = txtSubDiv.Text; param[6] = "Is_Active"; if (chkIsAct.Checked == true) { param[7] = "Y"; } else { param[7] = "N"; } param[8] = "Userid"; param[9] = ClsConnection.Userid; param[10] = "Ip_Addr"; param[11] = ClsConnection.StrIP; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Update_Sub_Division", "1", "Sub Division Master", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Updated Successfully.');</script>"); } Popup(false); Load_Grid(); ClearControls(); } catch (Exception ex) { //lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void Update_Data() { try { string[] param = new string[12]; param[0] = "Bank_Id"; param[1] = lblBankId.Text; param[2] = "Bank_Name"; param[3] = txtBankName.Text; param[4] = "Bank_Address"; param[5] = txtBankAddress.Text; param[6] = "Is_Active"; if (chkIsAct.Checked == true) { param[7] = "1"; } else { param[7] = "0"; } param[8] = "Userid"; param[9] = ClsConnection.Userid; param[10] = "Ip_Addr"; param[11] = ClsConnection.StrIP; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Update_Bank_Master", "1", "Bank Master", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Updated Successfully.');</script>"); } Popup(false); BindGrid(); ClearControls(); } catch (Exception ex) { //lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { try { if (txtstatename.Text == "") { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Please enter State Name')", true); return; } DateTime localdate = DateTime.Now; string[] param = new string[8]; param[0] = "State_name"; param[1] = txtstatename.Text; param[2] = "Is_Active"; param[3] = "1"; param[4] = "Created_on"; param[5] = string.Format("{0:s}", localdate); param[6] = "cuserid"; param[7] = ClsConnection.Userid; int rowaffected = CommanDataLoad.ExecuteNonQuery("SpInsState_Master", "1", "State_Master", param); if (rowaffected > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Saved Successfully')", true); BindGrid(); } ClearControls(); } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Some Error' + ex.Message.ToString();)", true); } }
protected void btnsubmit_Click(object sender, EventArgs e) { string strPass = CommanDataLoad.Generate(6, 8); // strPass = "******"; try { string[] param = new string[16]; param[0] = "UserName"; param[1] = txtusername.Text; param[2] = "Email"; param[3] = txtemail.Text; param[4] = "UserPassword"; param[5] = CommanDataLoad.EncryptPassword(strPass); param[6] = "GroupId"; param[7] = ddlGroupid.SelectedValue; param[8] = "ip"; param[9] = ClsConnection.StrIP; param[10] = "Mobile"; param[11] = txtmobile.Text; param[12] = "Company_Id"; param[13] = ddlcompany.SelectedValue; param[14] = "empcode"; param[15] = txtempcode.Text; Send_mail(strPass); int rowaffected = CommanDataLoad.ExecuteNonQuery("Usp_User_master_insert", "1", "User_Master", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Inserted Successfully.');</script>"); } ClearControls(); //GridView1.DataBind(); } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); //Console.WriteLine("Some ERROR" + ex.Message.ToString()); } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { string[] param = new string[10]; param[0] = "Bank_Name"; param[1] = txtBankNm.Text; param[2] = "Bank_Address"; param[3] = txtAddress.Text; param[4] = "Is_Active"; if (chkIsActive.Checked == true) { param[5] = "1"; } else { param[5] = "0"; } param[6] = "IpAddr"; param[7] = ClsConnection.StrIP; param[8] = "UserId"; param[9] = ClsConnection.Userid; int rowaffected = CommanDataLoad.ExecuteNonQuery("USP_Insert_Bank_Master", "1", "Bank_Master", param); if (rowaffected > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Saved Successfully')", true); BindGrid(); } ClearControls(); } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Some Error' + ex.Message.ToString();)", true); } }
protected void btnSubmit_Click(object sender, ImageClickEventArgs e) { try { string[] param = new string[18]; param[0] = "UserName"; param[1] = txtusername.Text; param[2] = "Email"; param[3] = txtemail.Text; param[4] = "UserPassword"; param[5] = txtPassword.Text; param[6] = "GroupId"; param[7] = ddlGroupid.SelectedValue; param[8] = "ip"; param[9] = ClsConnection.StrIP; param[10] = "Mobile"; param[11] = txtmobile.Text; param[12] = "Company_Id"; param[13] = ddlcompany.SelectedValue; param[14] = "Vendor_Id"; param[15] = ddlvendor.SelectedValue; param[16] = "UserId"; param[17] = id.Text; int rowaffected = CommanDataLoad.ExecuteNonQuery("Usp_User_master_update", "1", "User_Master_Edit", param); if (rowaffected > 0) { Response.Write("<script>alert('Record Updated Successfully.');</script>"); } ClearControls(); GridView1.DataBind(); } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { try { string[] param = new string[12]; param[0] = "GroupName"; param[1] = txtGroupname.Text; param[2] = "ISAdmin"; param[3] = ddlisAdmin.SelectedValue; param[4] = "isActive"; param[5] = chkActive.Checked.ToString(); param[6] = "ip"; param[7] = ClsConnection.StrIP; param[8] = "userid"; param[9] = ClsConnection.Userid; param[10] = "Groupid"; param[11] = id.Text; int rowaffected = CommanDataLoad.ExecuteNonQuery("Usp_Group_Master_Insert", "1", "Group_Master", param); if (id.Text != "") { Response.Write("<script>alert('Data updated Succesfully');</script>"); } else { Response.Write("<script>alert('Data Inserted Succesfully');</script>"); } GridView1.DataBind(); ClearControls(); } catch (Exception ex) { lblmsg.Text = "Some Error" + ex.Message.ToString(); } }