protected void btnSave_Click(object sender, EventArgs e) { string[] p = { "@Title", "@Abbreviation", "@FarsiTitle", "@User", "@Date", "@Error" }; string[] v = { txtTitle.Text, txtAbbreviation.Text, txtFarsiTitle.Text, "1", DateTime.Now.ToString() }; string Error = db.ExecuteProcedureDML(p, v, "spPageAcademicYearSave"); if (Error == "0") { FillGrid(); ScriptManager.RegisterStartupScript(this, this.GetType(), "ss", "SuccessMsg();", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "ss", "alert('" + Error + "');", true); } }
public static string SaveRecord(DepartmentInfo obj) { DBCommunicator db = new DBCommunicator(); string[] p = { "@Title", "@Abbreviation", "@FarsiTitle", "@User", "@Date", "@Error" }; string[] v = { obj.Title, obj.Abbreviation, obj.FarsiTitle, "1", DateTime.Now.ToString() }; string r = db.ExecuteProcedureDML(p, v, "spPageDepartmentSave"); return(r); }
public static string DeleteRecord(int Code) { DBCommunicator db = new DBCommunicator(); string[] p = { "@Code", "@Error" }; string[] v = { Code.ToString() }; string r = db.ExecuteProcedureDML(p, v, "spPageDepartmentDelete"); return(r); }