public int SaveNewPassword(string userName, string currentPass, string newPass) { this.userName = userName; this.newPass = newPass; this.currentPass = currentPass; try { string Query = "BEGIN Update EmpMaster Set password = '******' Where userName = '******' COLLATE SQL_Latin1_General_CP1_CS_AS And password ='******' COLLATE SQL_Latin1_General_CP1_CS_AS END "; rows = db.Save_Delete_Update(Query); } catch (SqlException) { MessageBox.Show("Check the Database Connecton", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception) { MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(rows); }
public int SubmitData(string fName, string lName, string addLine1, string addLine2, string addLine3, string landlineNo, string mobNo) { try { string Query = "Insert into cusMaster values ('" + fName + "','" + lName + "', '" + addLine1 + "','" + addLine2 + "','" + addLine3 + "','" + landlineNo + "','" + mobNo + "')"; rows = db.Save_Delete_Update(Query); } catch (SqlException) { MessageBox.Show("Check the Database Connecton", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception) { MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(rows); }
public int SubmitData(string b, string c, string d, string e, string f) { this.fName = b; this.lName = c; this.designation = d; this.userName = e; this.password = f; try { string Query = "Insert into empMaster1 values ('" + fName + "','" + lName + "', '" + designation + "','" + userName + "','" + password + "')"; rows = db.Save_Delete_Update(Query); } catch (SqlException) { MessageBox.Show("Check your Database Connecton", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception) { MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(rows); }
public int SubmitData(string a, string b, string c, string d, string e, string f, string g) { this.supName = a; this.addLine1 = b; this.addLine2 = c; this.addLine3 = d; this.landlineNo = e; this.faxNo = f; this.supEmail = g; try { string Query = "Insert into supMaster values ('" + supName + "','" + addLine1 + "','" + addLine2 + "','" + addLine3 + "','" + landlineNo + "','" + faxNo + "','" + supEmail + "')"; rows = db.Save_Delete_Update(Query); } catch (SqlException) { MessageBox.Show("Check the Database Connecton", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception) { MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(rows); }