예제 #1
0
 public static void ParseDataTable(DataTable data)
 {
     Username  = NullCheck.IsNullString(data.Rows[0][nameof(Username)]);
     Name      = NullCheck.IsNullString(data.Rows[0][nameof(Name)]);
     Surname   = NullCheck.IsNullString(data.Rows[0][nameof(Surname)]);
     UserLevel = NullCheck.IsNullInt(data.Rows[0][nameof(UserLevel)]);
     UserId    = NullCheck.IsNullInt(data.Rows[0][nameof(UserId)]);
     SuperUser = NullCheck.IsNullBoolean(data.Rows[0][nameof(SuperUser)]);
     LogLogin();
 }
예제 #2
0
        public void LoadData()
        {
            DataTable dt = Sql.GetTable(SelectProcedure, new object[] { "@PartnerId", PartnerId });

            if (dt.Rows.Count > 0)
            {
                tPartnerCode.Text  = NullCheck.IsNullString(dt.Rows[0]["PartnerCode"]);
                tPartnerName.Text  = NullCheck.IsNullString(dt.Rows[0]["Partnername"]);
                cbCustomer.Checked = NullCheck.IsNullBoolean(dt.Rows[0]["IsCustomer"]);
                cbSupply.Checked   = NullCheck.IsNullBoolean(dt.Rows[0]["IsSupplier"]);
                tCreated.Text      = NullCheck.IsNullDate(dt.Rows[0]["Created"]).ToShortDateString();
                tUpdated.Text      = NullCheck.IsNullDate(dt.Rows[0]["Updated"]).ToShortDateString();
            }
        }