protected override void Loading()
        {
            ctDistrict.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "区域");
            ctDistrict.DisplayMember = "Name";

            ctGroupMonitor.DataSource    = BllAttendanceRate.GetGroupMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctGroupMonitor.DisplayMember = "Name";


            if (!IsAdd)
            {
                var obj = AttendanceRate.FindById(long.Parse(ItemID));
                BindControlsDecimal.BindObjectToControls(obj, tabPage1);
                ReSetNumbericUpDownStatus();
            }
            else
            {
                ctInputDate.Value = UserStatics.GetSqlServerDateTime();
            }
        }
Esempio n. 2
0
        protected override void Loading()
        {
            ctIsAddToInventory.Checked = true;
            ctUnitConvValue.Value      = 1;

            ctCategory.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "物料分类");
            ctCategory.DisplayMember = "Name";

            ctPurchaseUnitName.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "单位");
            ctPurchaseUnitName.DisplayMember = "Name";

            ctSaleUnitName.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "单位");
            ctSaleUnitName.DisplayMember = "Name";


            if (!IsAdd || IsSaved)
            {
                var obj = BaseInfoMaterial.FindById(long.Parse(ItemID));
                BindControlsDecimal.BindObjectToControls(obj, tabPage1);
                BindControlsDecimal.BindObjectToControls(obj, tabPage2);
                bsIngredients.DataSource  = BllBaseInfoMaterialIngredients.GetDestTable(UserStatics.OptrType, ItemID);
                dgvIngredients.DataSource = bsIngredients;
            }
        }