예제 #1
0
        public FmFileExplorer(string cardNo)
        {
            InitializeComponent();

            var ctrl = new FileExpControl(cardNo);

            ctrl.Parent = this;
            ctrl.Dock   = DockStyle.Fill;
            ctrl.Show();
        }
예제 #2
0
        //加载流转卡数据
        private void LoadCardData(string cardNo)
        {
            if (!dal.Exists(cardNo))
            {
                throw new Exception("找不到流转卡: " + cardNo);
            }

            card = dal.Get(cardNo);

            if (card == null)
            {
                MsgBox.ShowInfoMsg("找不到流转卡: " + cardNo);
                return;
            }

            if (card.M.curOperation == null)
            {
                MsgBox.ShowInfoMsg("当前工序为空!");
                return;
            }

            //istatus = 1 物料需求标识
            if (card.M.curOperation.iStatus == 0)
            {
                dal.SetOperationStatus(1, card.M.curOperation.AutoId);
                card.M.curOperation.iStatus = 1;
            }

            UIBinding <CardMain> .UIDataBinding(pnl_Main, card.M);

            UIBinding <CardDetail> .UIDataBinding(lbl_dStartDate, "dStartDate", card.M.curOperation);

            list_children.Items.Clear();

            foreach (CardChildren c in card.ZJList)
            {
                ListViewItem item = new ListViewItem(c.OpName.ToString());
                item.SubItems.Add(c.cInvCode);
                item.SubItems.Add(c.cInvName);
                item.SubItems.Add(c.cInvStd);
                item.SubItems.Add(c.iQuantity.ToString());
                item.SubItems.Add(c.rQuantity.ToString());
                item.Tag = c;
                list_children.Items.Add(item);
            }

            switch (card.M.curOperation.iStatus)
            {
            case 1:
                lbl_Status.Text = "材料准备";
                break;

            case 2:
                lbl_Status.Text = "材料确认";
                break;

            case 3:
                lbl_Status.Text = "已开工";
                break;

            case 4:
                lbl_Status.Text = "已报检";
                break;

            case 5:
                lbl_Status.Text = "已检验";
                break;

            case 6:
                lbl_Status.Text = "已完工";
                break;
            }

            this.SetBtnGo(BtnGo);
            //this.SetBtnBack(btnBack);
            this.btnBack.Visible = card.M.curOperation.iStatus > 1;

            lbl_bQuality.Text = card.M.curOperation.bQuality ? "是" : "否";
            lbl_bChild.Text   = card.M.bChild ? "是" : "否";
            lbl_QmR.Text      = new QmCardOPDAL().HaveQmReport(card.M.curOperation) ? "已报检" : "未报检";

            #region 加载共享文件列表

            FileExpControl ctrl = new FileExpControl(cardNo);
            ctrl.Parent = groupPanel2;
            ctrl.Dock   = DockStyle.Fill;
            ctrl.Show();

            #endregion
        }