Пример #1
0
 public static List<Dictionary<string, object>> Fetch_Details(string imode, int NotificationID)
 {
     DataSet ds = new DataSet();
     List<Dictionary<string, object>> rows = new List<Dictionary<string, object>>();
     Dictionary<string, object> row = new Dictionary<string, object>();
     try
     {
         bel_Notification obj_bel_Notification = new bel_Notification();
         dal_Notification obj_dal_Notificaion = new dal_Notification();
         obj_bel_Notification._iMode = imode;
         obj_bel_Notification._NotificationID = NotificationID;
         obj_bel_Notification._BranchID = 1;
         using (ds = obj_dal_Notificaion.dal_NotificationHeader(obj_bel_Notification))
         {
             if (ds.Tables.Count > 0)
             {
                 return Json.getjson_(ds.Tables[0]);
             }
             else
             {
                 row.Add("res", "No Data");
                 rows.Add(row);
                 return rows;
             }
         }
     }
     catch (Exception ex)
     {
         row.Add("res", "exception");
         rows.Add(row);
         return rows;
     }
 }
Пример #2
0
        public DataSet dal_NotificationHeader(bel_Notification obj_bel_Notification)
        {
            DataSet ds = new DataSet();
            try
            {

                SqlCommand sqlcmd = new SqlCommand("spu_NotificationHeader");
                sqlcmd.CommandTimeout = 0;
                sqlcmd.CommandType = CommandType.StoredProcedure;
                sqlcmd.Parameters.Clear();
                sqlcmd.Parameters.AddWithValue("@Notrification_ID", obj_bel_Notification._NotificationID);
                sqlcmd.Parameters.AddWithValue("@Type", obj_bel_Notification._Type);
                sqlcmd.Parameters.AddWithValue("@Date", obj_bel_Notification._NotificationDate);
                sqlcmd.Parameters.AddWithValue("@ShortDescription", obj_bel_Notification._shrtdescription);
                sqlcmd.Parameters.AddWithValue("@Description", obj_bel_Notification._description);
                sqlcmd.Parameters.AddWithValue("@UserGroupID", obj_bel_Notification._UsergroupID);
                sqlcmd.Parameters.AddWithValue("@UserID", obj_bel_Notification._UserID);
                sqlcmd.Parameters.AddWithValue("@Status", obj_bel_Notification._Status);
                sqlcmd.Parameters.AddWithValue("@BranchID", obj_bel_Notification._BranchID);
                sqlcmd.Parameters.AddWithValue("@CreatedBy", Convert.ToInt32(HttpContext.Current.Session["UserID"]));
                sqlcmd.Parameters.AddWithValue("@CreatedOn", obj_bel_Notification._CreatedOn);
                sqlcmd.Parameters.AddWithValue("@ModifiedBy", Convert.ToInt32(HttpContext.Current.Session["UserID"]));
                sqlcmd.Parameters.AddWithValue("@ModifiedOn", obj_bel_Notification._ModifiedOn);
                sqlcmd.Parameters.AddWithValue("@iMode", obj_bel_Notification._iMode);
                ds = DataFunctions.GetDataSet(sqlcmd);
            }
            catch (Exception ex)
            {

            }
            return ds;
        }
Пример #3
0
 public static List<Dictionary<string, object>> Save_Notifcaion(string imode, string userid, string type, DateTime date, string shrtdesc, string desc, int noticationid, string usergrpid)
 {
     DataSet ds = new DataSet();
     List<Dictionary<string, object>> rows = new List<Dictionary<string, object>>();
     Dictionary<string, object> row = new Dictionary<string, object>();
     try
     {
         bel_Notification obj_bel_Notification = new bel_Notification();
         dal_Notification obj_dal_Notificaion = new dal_Notification();
         obj_bel_Notification._iMode = imode;
         obj_bel_Notification._UserID = userid;
         obj_bel_Notification._Type = type;
         obj_bel_Notification._NotificationDate = date;
         obj_bel_Notification._shrtdescription = shrtdesc;
         obj_bel_Notification._description = desc;
         obj_bel_Notification._BranchID = 1;
         obj_bel_Notification._NotificationID = noticationid;
         obj_bel_Notification._UsergroupID = usergrpid;
         using (ds = obj_dal_Notificaion.dal_NotificationHeader(obj_bel_Notification))
         {
             if (ds.Tables.Count > 0)
             {
                 return Json.getjson_(ds.Tables[0]);
             }
             else
             {
                 row.Add("res", "No Data");
                 rows.Add(row);
                 return rows;
             }
         }
     }
     catch (Exception ex)
     {
         row.Add("res", "exception");
         rows.Add(row);
         return rows;
     }
 }