public DataSet INSERT_UPDATE_DISCIPLINE(mDiscipline _obj)
        {
            try
            {
                _cn.Open();
                SqlCommand _cmd = new SqlCommand("INSERT_UPDATE_DISCIPLINE", _cn);
                _cmd.Parameters.AddWithValue("@Discipline_ID", _obj.Discipline_ID);
                _cmd.Parameters.AddWithValue("@Discipline", _obj.Discipline);
                _cmd.Parameters.AddWithValue("@isNicheCourse", _obj.isNicheCourse);

                Debug.Print(string.Format("{0} @Discipline_ID='{1}', @Discipline='{2}', @isNicheCourse='{3}'", _cmd.CommandText, "Discipline_ID", "Discipline", "isNicheCourse"));

                _cmd.CommandType    = CommandType.StoredProcedure;
                _cmd.CommandTimeout = 300;
                SqlDataAdapter _adp = new SqlDataAdapter(_cmd);
                DataSet        _ds  = new DataSet();
                _adp.Fill(_ds);
                _adp.Dispose();
                _cmd.Dispose();
                return(_ds);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                _cn.Close();
            }
        }
        public JsonResult SaveData(mDiscipline _obj)
        {
            string Code = string.Empty, Message = string.Empty;

            try
            {
                Discipline_Repository _objRepo = new Discipline_Repository();
                DataSet _ds = _objRepo.INSERT_UPDATE_DISCIPLINE(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        DataRow _dr = _ds.Tables[0].Rows[0];
                        if (_dr["COUNTS"].ToString() == "1")
                        {
                            Code    = "success";
                            Message = "Data saved successfully";
                        }
                        else if (_dr["COUNTS"].ToString() == "2")
                        {
                            Code    = "success";
                            Message = "Data updated successfully";
                        }
                        else if (_dr["COUNTS"].ToString() == "-1")
                        {
                            Code    = "already";
                            Message = "Data is already exists";
                        }
                        else
                        {
                            Code    = "error";
                            Message = "No data saved. Kindly try again.";
                        }
                    }
                }
            }
            catch (NullReferenceException)
            {
                Code    = "error";
                Message = "Your session has been expired. Kindly refresh and try again.";
            }
            catch (Exception)
            {
                Code    = "error";
                Message = "Error from server side. Kindly refresh and try again.";
            }
            return(Json(new
            {
                c = Code,
                m = Message
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }