Beispiel #1
0
 public RetailShiftBO(RetailShift shift)
 {
     this.ID        = shift.ID;
     this.Name      = shift.Name;
     OrganizationID = shift.OrganizationID;
     this.IsEnabled = shift.IsEnabled;
     CreateTime     = shift.CreateTime;
     CreatorID      = shift.CreatorID;
 }
        //private void myRadDataForm_BeginningEdit(object sender, System.ComponentModel.CancelEventArgs e)
        //{
        //    RetailShift shift = (RetailShift)myRadDataForm.CurrentItem;
        //    if (shift.OrganizationID != VMGlobal.CurrentUser.OrganizationID)
        //    {
        //        MessageBox.Show("只能修改本机构创建的班次信息.");
        //        e.Cancel = true;
        //    }
        //}

        private void myRadDataForm_AddedNewItem(object sender, AddedNewItemEventArgs e)
        {
            RetailShift shift = (RetailShift)myRadDataForm.CurrentItem;

            shift.OrganizationID = VMGlobal.CurrentUser.OrganizationID;
        }