Exemplo n.º 1
0
 public frmTimeInOut(object id, DateTime Ngay, bool? IsAdd)
 {
     this.IsAdd = IsAdd;
     if (this.IsAdd == true) NV_ID = this.GetNVID(FrameworkParams.currentUser.id);
     else if (this.IsAdd == false || this.IsAdd == null) NV_ID = HelpNumber.ParseInt64(id);
     InitializeComponent();
     if (this.IsAdd == false)
         HelpXtraForm.SetCloseForm(this, btnClose, true);
     else
     {
         this.btnClose.Click += delegate(object sender, EventArgs e)
         {
             this.Close();
         };
     }
     this.NgayLamViec = Ngay;
     DateTimeServer = Ngay;
     InitAdd();
     InitGrid();
     if (IsAdd != null) InitValidation();
     if (!InitDOData(id, Ngay)) PLCtrl.HuyForm(this);
     InitGridData(id);
     InitControlState();
     Error = new DXErrorProvider(this);
     TimeSystem = DASystemParams.Instance.LoadAll(1);
     Uncategory.setEnterAsTab(this);
     btnStart.Image = FWImageDic.SAVE_IMAGE16;
     this.btnEnd.Image = FWImageDic.SAVE_IMAGE16;
     btnClose.Image = FWImageDic.CLOSE_IMAGE16;
 }
Exemplo n.º 2
0
 public frmTimeInOutQL()
 {
     InitializeComponent();
     IDField = "ID";
     DisplayField = "ID";
     Fix = new PhieuQuanLy10Fix(this);
     TimeSystem = DASystemParams.Instance.LoadAll(1);
     gridViewMaster.OptionsBehavior.AutoExpandAllGroups = true;
     gridViewMaster.OptionsView.ShowGroupedColumns = false;
     Cot_Noi_Dung.Visible = true;
     InitState(false);
     this.barButtonItemDuyet.Glyph = FWImageDic.COMMIT_IMAGE16;
     this.barButtonItemK_Duyet.PaintStyle = BarItemPaintStyle.CaptionGlyph;
     this.barButtonItemDuyet.PaintStyle = BarItemPaintStyle.CaptionGlyph;
     this.barButtonItemK_Duyet.Glyph = FWImageDic.UNCOMMIT_IMAGE16;
     this.barButtonItemPrint.Visibility = BarItemVisibility.Never;
     barButtonItemDuyet.ItemClick += new ItemClickEventHandler(barButtonItemDuyet_ItemClick);
     barButtonItemK_Duyet.ItemClick += new ItemClickEventHandler(barButtonItemK_Duyet_ItemClick);
     gridViewMaster.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(gridViewMaster_CustomDrawCell);
     barSubItem1.Visibility = BarItemVisibility.Always;
 }