private void LoadDataToEdit(SYS_tblUserDTO item) { txtUsername.EditValue = (item == null) ? null : item.Username; txtUsername.Properties.ReadOnly = (item == null || isDuplicate) ? false : true; txtPassword.EditValue = (item == null) ? null : iPOS.Core.Security.EncryptEngine.Decrypt(item.Password); //gluGroupUser.EditValue = "1";// (item == null) ? null : item.GroupID; chkIsEmployee.Checked = (item == null) ? false : (!string.IsNullOrEmpty(item.EmpID)) ? true : false; txtFullName.EditValue = (item == null) ? null : item.FullName; gluEmployee.EditValue = (item == null) ? null : item.EmpID; dteEffectiveDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.EffectiveDate; dteToDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.ToDate; chkLocked.Checked = (item == null) ? false : item.Locked; dteLockDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.LockDate; dteUnlockDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.UnlockDate; chkCanNotChangePassword.Checked = (item == null) ? false : item.CanNotChangePassword; chkChangePassNextTime.Checked = (item == null) ? false : item.ChangePassNextTime; chkPasswordNeverExpired.Checked = (item == null) ? true : item.PassNeverExpired; txtEmail.EditValue = item == null ? null : item.Email; mmoNote.EditValue = item == null ? null : item.Note; if (item == null) { depError.ClearErrors(); this.ParentForm.Text = LanguageEngine.GetOpenFormText(this.Name, ConfigEngine.Language, false); txtUsername.Focus(); } }
private void LoadDataToEdit(PRO_tblProvinceDTO item) { txtProvinceID.EditValue = (item == null) ? null : item.ProvinceID; txtProvinceCode.EditValue = (item == null) ? null : item.ProvinceCode; //txtProvinceCode.Properties.ReadOnly = (item == null) ? false : true; txtVNName.EditValue = (item == null) ? null : item.VNName; txtENName.EditValue = (item == null) ? null : item.ENName; speRank.EditValue = (item == null) ? null : item.Rank; chkUsed.Checked = (item == null) ? true : item.Used; mmoNote.EditValue = (item == null) ? null : item.Note; if (item == null) { depError.ClearErrors(); this.ParentForm.Text = LanguageEngine.GetOpenFormText(this.Name, ConfigEngine.Language, false); txtProvinceCode.Focus(); } }
private void LoadDataToEdit(PRO_tblStallDTO item) { txtStallID.EditValue = (item == null) ? null : item.StallID; txtStallCode.EditValue = (item == null) ? null : item.StallCode; //txtStallCode.Properties.ReadOnly = (item == null) ? false : true; txtVNName.EditValue = (item == null) ? null : item.VNName; txtENName.EditValue = (item == null) ? null : item.ENName; gluStore.EditValue = (item == null) ? null : item.StoreID; gluWarehouse.EditValue = (item == null) ? null : item.WarehouseID; speRank.EditValue = (item == null) ? null : item.Rank; mmoNote.EditValue = (item == null) ? null : item.Note; if (item == null) { depError.ClearErrors(); this.ParentForm.Text = LanguageEngine.GetOpenFormText(this.Name, ConfigEngine.Language, false); txtStallCode.Focus(); } }
private void LoadDataToEdit(PRO_tblLevel2DTO item) { txtLevel2ID.EditValue = item == null ? null : item.Level2ID; txtLevel2Code.EditValue = item == null ? null : item.Level2Code; txtLevel2ShortCode.EditValue = item == null ? null : item.Level2ShortCode; txtVNName.EditValue = item == null ? null : item.VNName; txtENName.EditValue = item == null ? null : item.ENName; speRank.EditValue = item == null ? null : item.Rank; chkUsed.Checked = item == null ? true : item.Used; mmoDescription.EditValue = item == null ? null : item.Description; mmoNote.EditValue = item == null ? null : item.Note; gluLevel1.EditValue = item == null ? null : item.Level1ID; if (item == null) { depError.ClearErrors(); this.ParentForm.Text = LanguageEngine.GetOpenFormText(this.Name, ConfigEngine.Language, false); txtLevel2Code.Focus(); } }
private void LoadDataToEdit(PRO_tblStoreDTO item) { txtStoreID.EditValue = (item == null) ? null : item.StoreID; txtStoreCode.EditValue = (item == null) ? null : item.StoreCode; //txtStoreCode.Properties.ReadOnly = (item == null) ? false : true; txtShortCode.EditValue = (item == null) ? null : item.ShortCode; txtVNName.EditValue = (item == null) ? null : item.VNName; txtENName.EditValue = (item == null) ? null : item.ENName; dteBuildDate.EditValue = (item == null) ? null : item.BuildDate; dteEndDate.EditValue = (item == null) ? null : item.EndDate; txtAddressVN.EditValue = (item == null) ? null : item.AddressVN; txtAddressEN.EditValue = (item == null) ? null : item.AddressEN; gluProvince.EditValue = (item == null) ? null : item.ProvinceID; gluDistrict.EditValue = (item == null) ? null : item.DistrictID; txtPhone.EditValue = (item == null) ? null : item.Phone; txtFax.EditValue = (item == null) ? null : item.Fax; txtTaxCode.EditValue = (item == null) ? null : item.TaxCode; speRank.EditValue = (item == null) ? null : item.Rank; txtRepresentives.EditValue = (item == null) ? null : item.Representatives; chkIsRoot.Checked = (item == null) ? false : item.IsRoot; chkUsed.Checked = (item == null) ? true : item.Used; mmoNote.EditValue = (item == null) ? null : item.Note; if (item != null && !string.IsNullOrEmpty(item.PhotoUri)) { picPhoto.LoadAsync(item.PhotoUri); } else { picPhoto.EditValue = null; } if (item == null) { depError.ClearErrors(); this.ParentForm.Text = LanguageEngine.GetOpenFormText(this.Name, ConfigEngine.Language, false); txtStoreCode.Focus(); } }
private void LoadDataToEdit(PRO_tblWarehouseDTO item) { txtWarehouseID.EditValue = (item == null) ? null : item.WarehouseID; txtWarehouseCode.EditValue = (item == null) ? null : item.WarehouseCode; //txtWarehouseCode.Properties.ReadOnly = (item == null) ? false : true; txtVNName.EditValue = (item == null) ? null : item.VNName; txtENName.EditValue = (item == null) ? null : item.ENName; gluStore.EditValue = (item == null) ? null : item.StoreID; txtAddressEN.EditValue = (item == null) ? null : item.AddressEN; txtAddressVN.EditValue = (item == null) ? null : item.AddressVN; gluProvince.EditValue = (item == null) ? null : item.ProvinceID; gluDistrict.EditValue = (item == null) ? null : item.DistrictID; txtPhone.EditValue = (item == null) ? null : item.Phone; txtFax.EditValue = (item == null) ? null : item.Fax; speRank.EditValue = (item == null) ? null : item.Rank; chkUsed.Checked = (item == null) ? true : item.Used; mmoNote.EditValue = (item == null) ? null : item.Note; if (item == null) { depError.ClearErrors(); this.ParentForm.Text = LanguageEngine.GetOpenFormText(this.Name, ConfigEngine.Language, false); txtWarehouseCode.Focus(); } }