Example #1
0
 /// <summary>
 ///  窗体加载初始化
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UCStockReceiptManager_Load(object sender, EventArgs e)
 {
     try
     {
         //获取默认系统时间
         dateTimeStart.Value = DateTime.Now.AddMonths(-3).ToShortDateString();
         dateTimeEnd.Value   = DateTime.Now.ToString();
         //入库类型
         CommonFuncCall.BindInOutType(ComBin_wh_type_name, true, "请选择");
         //获取仓库名称
         CommonFuncCall.BindWarehouse(ComBwh_name, "请选择");
         //单据状态
         CommonFuncCall.BindOrderStatus(ComBorder_status_name, true);
         //公司
         CommonFuncCall.BindCompany(ComBcom_name, "全部");
         //部门
         CommonFuncCall.BindDepartment(ComBorg_name, "", "全部");
         //经办人
         CommonFuncCall.BindHandle(ComBhandle_name, "", "全部");
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
     }
 }
        /// <summary>
        /// 窗体初始加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UCStockReceiptAddOrEdit_Load(object sender, EventArgs e)
        {
            try
            {
                //出库类型
                CommonFuncCall.BindInOutType(Combout_wh_type_name, true, "请选择");
                //获取仓库名称
                CommonFuncCall.BindWarehouse(Combwh_name, "请选择");
                //公司ID
                string com_id = GlobalStaticObj.CurrUserCom_Id;
                CommonFuncCall.BindCompany(combcom_name, "全部");             //选择公司名称
                CommonFuncCall.BindDepartment(Comborg_name, com_id, "请选择"); //选择部门名称
                CommonFuncCall.BindHandle(Combhandle_name, "", "请选择");      //选择经手人

                if (status == WindowStatus.Edit || status == WindowStatus.Copy)
                {
                    GetBillHeadEndMessage(StockShippingId); //获取单据头尾信息
                    GetBillPartsMsg(StockShippingId);       //获取单据配件信息
                }
                else if (status == WindowStatus.Add || status == WindowStatus.Copy)
                {
                    txtorder_status_name.Caption = DataSources.GetDescription(DataSources.EnumAuditStatus.DRAFT, true);//获取单据状态
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }