private long[] GetNguoiNhanMail(DOPhieuTamUng phieu) { List<long> lstUser = new List<long>(NguoiNhanMail._SelectedIDs); if(!lstUser.Contains(phieu.NGUOI_DE_NGHI_ID)) lstUser.Add(phieu.NGUOI_DE_NGHI_ID); return lstUser.ToArray(); }
public override bool InitDOData() { if (base.ID is DOBangLuong) { DOBangLuong data = (DOBangLuong)base.ID; ///.... return (data != null); } else { Phieu = DAPhieuTamUng.I.LoadAll(HelpNumber.ParseInt64(base.ID)); cmbDuyet._init(true); if (Phieu != null && Phieu.MasterDataSet.Tables[0].Rows.Count > 0) { dateNgayDeNghi.DateTime = Phieu.NGAY_XIN_TAM_UNG; NhanVien._setSelectedID(Phieu.NGUOI_DE_NGHI_ID); calcSoTienXinUng.Value = Phieu.SO_TIEN_XIN_UNG; mboSoTienXinUng.Text = DAPhieuTamUng.DecimalToString(calcSoTienXinUng.Value); if (Phieu.LY_DO != null && Phieu.LY_DO.Length > 0) { mboLyDo.Text = Phieu.LY_DO; radioGroup.SelectedIndex = 1; mboLyDo.Enabled = true; } if (IsDuyet == false) Phieu.DUYET = ((Int32)DuyetSupportStatus.KhongDuyet).ToString(); else if (IsDuyet == true) Phieu.DUYET = ((Int32)DuyetSupportStatus.Duyet).ToString(); cmbDuyet.SetDuyet(Phieu); if (Phieu.THANG_TAM_UNG != null) dateThangNam._timeEdit.Time = Convert.ToDateTime(Phieu.THANG_TAM_UNG); if (IsDuyet == true && (Phieu.DUYET == ((Int32)DuyetSupportStatus.ChoDuyet).ToString() || Phieu.DUYET == ((Int32)DuyetSupportStatus.KhongDuyet).ToString())) btnSave.Enabled = false; } else { Phieu.MA_PHIEU = DAPhieuTamUng.I.GetPhieuTamUng(); } if (RowTamUng != null) Phieu.KET_CHUYEN_TU_LUONG = "Y";//Trường hợp kết chuyển tạm ứng. else Phieu.KET_CHUYEN_TU_LUONG = "N"; return (Phieu != null); } }