Example #1
0
        public void UpdateUserInfo(DataRow[] userinfo)
        {
            DataRow info = userinfo[0];

            UserEnrollNumber = (int)info["UserEnrollNumber"];
            UserFullName     = (string)info["UserFullName"];
            UserFullCode     = (string)info["UserFullCode"];
            UserIDTitle      = (int)info["UserIDTitle"];
            TitleName        = (string)info["TitleName"];
            if (info["IDD_1"] != DBNull.Value)
            {
                PBCap1 = new cPhongBan()
                {
                    ID = (int)info["IDD_1"], TenPhongBan = info["Description_1"].ToString()
                }
            }
            ;
            if (info["IDD_2"] != DBNull.Value)
            {
                PBCap2 = new cPhongBan()
                {
                    ID = (int)info["IDD_2"], TenPhongBan = info["Description_2"].ToString()
                }
            }
            ;
            HeSo.LuongCB     = (info["HeSoLuongCB"] != DBNull.Value) ? (Single)info["HeSoLuongCB"] : 0f;
            HeSo.LuongCV     = (info["HeSoLuongSP"] != DBNull.Value) ? (Single)info["HeSoLuongSP"] : 0f;
            HeSo.BHXH_YT_TN  = HeSo.LuongCB;                                                          // hệ số bảo hiểm, bình thường = hệ số lương cb. riêng gd, pgd thì + 0.5, 0.6
            MacDinhTinhPC150 = (info["TinhPC150"] != DBNull.Value) ? (bool)info["TinhPC150"] : false; //trong query là d1.TinhPC150
            int            schid = (int)info["SchID"];
            cShiftSchedule temp  = ThamSo.DSLichTrinh.Find(o => o.SchID == schid);

            DSCa       = temp.ListT1;
            DSCaMoRong = ThamSo.TaoDSCaMoRong(DSCa);
        }
        internal void TaoDSCa(DataRow[] arrRow_LichTrinh)
        {
            int            schID        = (int)arrRow_LichTrinh[0]["SchID"];
            cShiftSchedule tmpLichTrinh = ThamSo.DSLichTrinh.Find(item => item.SchID == schID);

            if (DSCa == null)
            {
                DSCa = new List <cShift>();
            }
            DSCa = tmpLichTrinh.ListT1;
        }