Beispiel #1
0
        public bool AddDepartment(ItemDepartmentObject itemDepartment)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@Name", itemDepartment.Name),
                new SqlParameter("@Description", itemDepartment.Description),
                new SqlParameter("@IsActive", itemDepartment.IsActive),
                new SqlParameter("@AddedBy", itemDepartment.AddedBy),
                new SqlParameter("@DateAdded", itemDepartment.DateAdded),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress())
            };

            return(Library.ConnectionString.returnCon.executeQuery("spAddDepartment", params_, CommandType.StoredProcedure));
        }
Beispiel #2
0
        public bool ActivateDepartment(ItemDepartmentObject itemdepartment)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@id", itemdepartment.Id),
                new SqlParameter("@Code", itemdepartment.Code),
                new SqlParameter("@table", "tblItemDepartmentRelationship"),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress()),
                new SqlParameter("@Module", "ITEM"),
                new SqlParameter("@AddedBy", itemdepartment.AddedBy),
                new SqlParameter("@DateAdded", itemdepartment.DateAdded)
            };

            return(Library.ConnectionString.returnCon.executeQuery("spActivateItem", params_, CommandType.StoredProcedure));
        }