public static List <ATTPost> GetAllDesgPost(int?orgID, int?desID, string created_date) { List <ATTPost> LstOrgDesgPost = new List <ATTPost>(); try { foreach (DataRow row in DLLPost.GetAllDesgPost(orgID, desID, created_date).Rows) { ATTPost ObjAtt = new ATTPost ( int.Parse(row["ORG_ID"].ToString()), int.Parse(row["DES_ID"].ToString()), (row["CREATED_DATE"] == System.DBNull.Value ? "" : (string)row["CREATED_DATE"]), int.Parse(row["POST_ID"].ToString()), (row["POST_NAME"] == System.DBNull.Value ? "" : (string)row["POST_NAME"]), (row["OCCUPIED"] == System.DBNull.Value ? "" : (string)row["OCCUPIED"])); ObjAtt.DesName = (string)row["DES_NAME"]; LstOrgDesgPost.Add(ObjAtt); } return(LstOrgDesgPost); } catch (Exception ex) { throw ex; } }
public static List <ATTPost> GetPost(int?PostId) { List <ATTPost> LstPost = new List <ATTPost>(); try { foreach (DataRow row in DLLPost.GetPost(PostId).Rows) { ATTPost ObjAtt = new ATTPost ( int.Parse(row["POST_ID"].ToString()), row["POST_NAME"].ToString() ); List <ATTPostLevel> PostLevelList = BLLPostLevel.GetPostLevel(ObjAtt.PostID); ObjAtt.LstPostLevel = PostLevelList.FindAll(delegate(ATTPostLevel att) { return(att.PostID == ObjAtt.PostID); }); LstPost.Add(ObjAtt); } return(LstPost); } catch (Exception ex) { throw ex; } }
public static bool DeletePost(int PostID) { try { return(DLLPost.DeletePost(PostID)); } catch (Exception ex) { throw ex; } }
public static bool SavePost(ATTPost ObjAtt) { try { return(DLLPost.SavePost(ObjAtt)); } catch (Exception ex) { throw ex; } }