public int saveBatch(int BatchID, int ClassID, string BatchName, string BatchCode, int LectureDuration, int IsLunchBreak, string LunchBreakStartTime, string LunchBreakEndTime, int MaxNoLecturesDay, int MaxNoLecturesWeek, int IsAllowMoreThanOneLectInBatch, int MaxNoOfLecureInRow, int UpdatedByUserID, string UpdatedDate, int IsActive, int IsDeleted) { int result = 0; conn = con.getConnection(); SqlCommand cmd = new SqlCommand("SaveBatch_SP", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@BatchID", BatchID); cmd.Parameters.AddWithValue("@ClassID", ClassID); cmd.Parameters.AddWithValue("@BatchName", BatchName); cmd.Parameters.AddWithValue("@BatchCode", BatchCode); cmd.Parameters.AddWithValue("@UpdatedByUserID", UpdatedByUserID); cmd.Parameters.AddWithValue("@UpdatedDate", UpdatedDate); cmd.Parameters.AddWithValue("@IsActive", IsActive); cmd.Parameters.AddWithValue("@IsDeleted", IsDeleted); cmd.Parameters.AddWithValue("@LectureDuration", LectureDuration); cmd.Parameters.AddWithValue("@IsLunchBreak", IsLunchBreak); cmd.Parameters.AddWithValue("@LunchBreakStartTime", LunchBreakStartTime); cmd.Parameters.AddWithValue("@LunchBreakEndTime", LunchBreakEndTime); cmd.Parameters.AddWithValue("@MaxNoLecturesDay", MaxNoLecturesDay); cmd.Parameters.AddWithValue("@MaxNoLecturesWeek", MaxNoLecturesWeek); cmd.Parameters.AddWithValue("@IsAllowMoreThanOneLectInBatch", IsAllowMoreThanOneLectInBatch); cmd.Parameters.AddWithValue("@MaxNoOfLecureInRow", MaxNoOfLecureInRow); conn.Open(); result = Convert.ToInt32(cmd.ExecuteScalar().ToString()); conn.Close(); return(result); }
public string SaveBranch(int BranchID, string BranchName, string BranchCode, string InstituteName, string Logo, int CreatedByUserID, int UpdatedByUserID, string UpdatedDate, int IsActive, int IsDelete) { string Result = null; con = conn.getConnection(); SqlCommand cmd = new SqlCommand("SaveBranch_SP", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@BranchID", BranchID); cmd.Parameters.AddWithValue("@BranchName", BranchName); cmd.Parameters.AddWithValue("@BranchCode", BranchCode); cmd.Parameters.AddWithValue("@InstituteName", InstituteName); cmd.Parameters.AddWithValue("@Logo", Logo); cmd.Parameters.AddWithValue("@CreatedByUserID", CreatedByUserID); cmd.Parameters.AddWithValue("@UpdateByUserId", UpdatedByUserID); cmd.Parameters.AddWithValue("@UpdatedDate", UpdatedDate); cmd.Parameters.AddWithValue("@IsActive", IsActive); cmd.Parameters.AddWithValue("@IsDelete", IsDelete); con.Open(); Result = cmd.ExecuteScalar().ToString(); con.Close(); return(Result); }