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; } }
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; } }