Exemplo n.º 1
0
        public 基础物品信息设置界面(int?goodsID, bool isSave)
        {
            InitializeComponent();

            m_goodsID = goodsID;

            if (goodsID == null)
            {
                MessageDialog.ShowPromptMessage("【物品信息】异常,请退出当前界面,再试");
                this.Close();
            }
            else
            {
                lbStock.Text = m_serverStock.GetGoodsStock((int)goodsID).ToString();
                m_goodsInfo  = m_serverGoods.GetGoodsInfo((int)goodsID);
                m_lstRecord  = m_serverGoods.GetGoodsAttirbuteRecordList((int)m_goodsID);
            }

            StapleInfo.InitUnitComboBox(cmbUnit);

            dataGridViewBlankToProduct.DataSource = new BindingList <View_F_GoodsBlankToProduct>(m_lstBlankToProductInfo);
            dataGridViewReplace.DataSource        = new BindingList <View_F_GoodsReplaceInfo>(m_lstReplaceInfo);
            dataGridViewWaterCode.DataSource      = new BindingList <F_ProductWaterCode>(m_lstWaterCode);

            ShowInfo(m_goodsInfo, m_lstRecord);

            if (isSave)
            {
                ShowRightControl();
            }
            else
            {
                btnSave.Visible = isSave;
            }
        }
        public 库房盘点表(string DJH, DataTable dt, AuthorityFlag m_authFlag, string strFlag)
        {
            InitializeComponent();
            m_billInfo = m_serverStroageCheck.GetBill(DJH);

            dataGridView1.DataSource = m_serverStroageCheck.GetList(DJH, dt);
            FaceAuthoritySetting.SetEnable(this.Controls, m_authFlag);
            FaceAuthoritySetting.SetVisibly(this.toolStrip1, m_authFlag);

            if (!BasicInfo.ListRoles.Contains(CE_RoleEnum.会计.ToString()))
            {
                txtZMJE.Visible = false;
                txtPDJE.Visible = false;
                label5.Visible  = false;
                label8.Visible  = false;
                dataGridView1.Columns["盘点金额"].Visible = false;
                dataGridView1.Columns["账面金额"].Visible = false;
                dataGridView1.Columns["盈亏金额"].Visible = false;
            }

            StapleInfo.InitUnitComboBox(cmbUnit);
            StapleInfo.InitStoreStateComboBox(cmbGoodsStatus);

            cmbUnit.SelectedIndex        = -1;
            cmbGoodsStatus.SelectedIndex = -1;

            if (strFlag == "0")
            {
                toolStrip1.Visible = true;
            }

            m_dtMx = (DataTable)dataGridView1.DataSource;
            RefreshDataGirdView(m_dtMx);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="operateMode">操作模式</param>
        /// <param name="billNo">普通入库单号</param>
        public 普通入库物品清单(CE_BusinessOperateMode operateMode, string billNo)
        {
            InitializeComponent();

            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true);
            UpdateStyles();

            m_operateMode = operateMode;
            m_billNo      = billNo;

            m_billInfo = ServerModuleFactory.GetServerModule <IOrdinaryInDepotBillServer>().GetBill(billNo);

            if (m_operateMode == CE_BusinessOperateMode.仓库核实)
            {
                btnAdd.Enabled       = false;
                btnDelete.Enabled    = false;
                btnDeleteAll.Enabled = false;
            }
            else
            {
                txtShelf.ReadOnly  = true;
                txtColumn.ReadOnly = true;
                txtLayer.ReadOnly  = true;

                if (m_operateMode == CE_BusinessOperateMode.查看)
                {
                    toolStrip1.Visible = false;
                }
            }

            m_queryResult = m_goodsServer.GetGoodsViewInfo(m_billNo);

            RefreshDataGridView(m_queryResult);

            StapleInfo.InitUnitComboBox(cmbUnit);

            // 添加数据定位控件
            m_dataLocalizer = new UserControlDataLocalizer(dataGridView1, this.Name,
                                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));

            panelTop.Controls.Add(m_dataLocalizer);

            m_dataLocalizer.Dock = DockStyle.Bottom;

            if (BasicInfo.ListRoles.Contains(CE_RoleEnum.采购账务管理员.ToString()) ||
                BasicInfo.ListRoles.Contains(CE_RoleEnum.会计.ToString()))
            {
                label19.Visible      = true;
                label20.Visible      = true;
                numUnitPrice.Visible = true;
                numPrice.Visible     = true;
            }
            else
            {
                label19.Visible      = false;
                label20.Visible      = false;
                numUnitPrice.Visible = false;
                numPrice.Visible     = false;
            }
        }
        public UserControlPlanCostBill(PlatformManagement.FunctionTreeNodeInfo nodeInfo)
        {
            InitializeComponent();

            m_authFlag = nodeInfo.Authority;

            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true);
            UpdateStyles();

            StapleInfo.InitUnitComboBox(cmbUnit);
        }
Exemplo n.º 5
0
        public 仓库_直接入库(FunctionTreeNodeInfo nodeInfo)
        {
            InitializeComponent();

            m_authorityFlag = nodeInfo.Authority;

            StapleInfo.InitUnitComboBox(cmbUnit);
            StapleInfo.InitStoreStateComboBox(cmbGoodsStatus);

            DisableControl();

            if ((m_authorityFlag & AuthorityFlag.Edit) == AuthorityFlag.Nothing)
            {
                numFactUnitPrice.Visible = false;
                numFactPrice.Visible     = false;
                lblFactPrice.Visible     = false;
                lblFactUnitPrice.Visible = false;
            }
            else
            {
                numFactUnitPrice.Visible = true;
                numFactPrice.Visible     = true;
                lblFactPrice.Visible     = true;
                lblFactUnitPrice.Visible = true;
            }

            QueryStock();

            // 添加数据定位控件
            m_dataLocalizer = new UserControlDataLocalizer(dataGridView1, this.Name,
                                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));
            panelPara.Controls.Add(m_dataLocalizer);
            m_dataLocalizer.Dock = DockStyle.Bottom;

            txtColumn.Enabled = true;
            txtLayer.Enabled  = true;
            txtShelf.Enabled  = true;
            txtRemark.Enabled = true;

            DataTable dt = UniversalFunction.GetStorageTb();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                cmbStorage.Items.Add(dt.Rows[i]["StorageName"].ToString());
            }

            cmbStorage.SelectedIndex = -1;
        }
        public override void LoadFormInfo()
        {
            try
            {
                m_lnqBillInfo.BillNo         = this.FlowInfo_BillNo;
                m_billNoControl              = new BillNumberControl(CE_BillTypeEnum.物料录入申请单.ToString(), m_serverGoodsEntering);
                m_billMessageServer.BillType = CE_BillTypeEnum.物料录入申请单.ToString();
                m_listGoodsEntering          = m_serverGoodsEntering.GetListInfo(FlowInfo_BillNo);
                StapleInfo.InitUnitComboBox(cmbUnit);

                ClearInfo();
                ShowInfo();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemplo n.º 7
0
        public 自制件工装报检明细(CE_BusinessOperateMode operateMode, string billNo)
        {
            InitializeComponent();

            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true);
            UpdateStyles();

            m_operateMode   = operateMode;
            m_billNo        = billNo;
            txtBill_ID.Text = m_billNo;

            S_FrockInDepotBill tempBill = m_goodsServer.GetBill(billNo);

            m_lnqWSCode = tempBill == null?
                          m_serverWSBasic.GetPersonnelWorkShop(BasicInfo.LoginID) :
                              m_serverWSBasic.GetPersonnelWorkShop(tempBill.JJRYID);

            if (m_operateMode == CE_BusinessOperateMode.仓库核实)
            {
                新建toolStripButton1.Visible = false;
                btnAdd.Enabled             = false;
                btnDelete.Enabled          = false;
                btnDeleteAll.Enabled       = false;
                btnFindCode.Enabled        = false;
                numGoodsAmount.Enabled     = false;
            }
            else
            {
                txtShelf.ReadOnly  = true;
                txtColumn.ReadOnly = true;
                txtLayer.ReadOnly  = true;

                if (m_operateMode == CE_BusinessOperateMode.查看)
                {
                    toolStrip1.Visible = false;
                }
                else if (m_operateMode == CE_BusinessOperateMode.新建)
                {
                    dateTime_BillTime.Value          = ServerModule.ServerTime.Time;
                    txtJJRY.Text                     = BasicInfo.LoginName;
                    toolStripSeparator2.Visible      = false;
                    toolStripSeparator3.Visible      = false;
                    toolStripSeparator7.Visible      = false;
                    toolStripSeparatorDelete.Visible = false;
                    toolStripSeparator1.Visible      = false;
                    groupBox1.Enabled                = false;
                    btnAdd.Visible                   = false;
                    btnDelete.Visible                = false;
                    btnDeleteAll.Visible             = false;
                    btnUpdate.Visible                = false;
                }
                else
                {
                    新建toolStripButton1.Visible = false;
                }
            }

            DataTable dt = UniversalFunction.GetStorageTb();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                cmbStorage.Items.Add(dt.Rows[i]["StorageName"].ToString());
            }

            cmbStorage.SelectedIndex = -1;

            StapleInfo.InitUnitComboBox(cmbUnit);

            // 添加数据定位控件
            m_dataLocalizer = new UserControlDataLocalizer(dataGridView1, this.Name,
                                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));
            groupBox1.Controls.Add(m_dataLocalizer);
            m_dataLocalizer.Dock = DockStyle.Bottom;


            m_billInfo = m_goodsServer.GetBill(billNo);

            if (m_billInfo != null)
            {
                txtJJRY.Text            = UniversalFunction.GetPersonnelName(m_billInfo.JJRYID);
                dateTime_BillTime.Value = m_billInfo.Bill_Time;
                cmbStorage.Text         = UniversalFunction.GetStorageName(m_billInfo.StorageID);
                txtProposer.Text        = UniversalFunction.GetPersonnelName(m_billInfo.ProposerID);
                txtDesigner.Text        = UniversalFunction.GetPersonnelName(m_billInfo.DesignerID);
                txtDepotManager.Text    = UniversalFunction.GetPersonnelName(m_billInfo.DepotManager);
                txtRemark.Text          = m_billInfo.Remark;

                m_queryResultGoods = m_goodsServer.GetGoodsInfo(billNo);

                if (m_queryResultGoods != null)
                {
                    RefreshDataGridView(m_queryResultGoods);
                }
            }

            if (!Convert.ToBoolean(BasicInfo.BaseSwitchInfo[(int)GlobalObject.CE_SwitchName.开启车间管理模块]))
            {
                btnBatchNo.Visible = false;
            }
        }