Beispiel #1
0
        private void AddCheckInDT(string qrcode, int id)
        {
            CheckInDT dT = new CheckInDT
            {
                CheckData   = DateTime.Now.ToShortDateString(),
                CheckInID   = id,
                delflag     = false,
                Rating      = ratingStar.Rating,
                Meno        = frist_ScStauts.Dicval,
                GoodsStauts = frist_ScStauts.id
            };

            int iddt = checkInService.AddCheckInDT(dT);

            if (iddt > 0)
            {
                ShowTipsMessageBox("添加成功");
                pb_qr.Image     = QRManage.GetQRCodeByZXingNet(qrcode, pb_qr.Width, pb_qr.Height);
                lbl_qrcode.Text = qrcode;

                StepItem item = new StepItem(frist_ScStauts.id.ToString(), frist_ScStauts.Dicname);
                progressSteps.Items.Add(item);
                Btn_adddt.Visible = true;
                btn_print.Visible = true;
                GetHistory((int)txb_name.Tag);
            }
            oper = 0;
        }
Beispiel #2
0
        private void FixControlData()
        {
            int    row  = dgv.SelectedCells[0].RowIndex;
            string mtid = dgv["id", row].Value.ToString();
            PostData <CheckInDT, CheckInMT> post = checkInService.GetCheckInDTMT(mtid);

            if (post.MCount == 0)
            {
                ShowErrorMessageBox("获取失败,请重新点击");
                return;
            }

            CheckInMT        mT     = post.Entity;
            List <CheckInDT> dtlist = post.DList;

            rtxb_mtmemo.Text = mT.Memo;
            pb_qr.Tag        = mtid.ToInt();
            string st = serverTypelist.Find(s => s.id == mT.ServerTypeID).TreeName;

            txb_servertype.Text = st;
            pb_qr.Image         = QRManage.GetQRCodeByZXingNet(mT.QRcode, pb_qr.Width, pb_qr.Height);

            CleanSetpItems();
            foreach (CheckInDT dt in dtlist)
            {
                AddProgressSetp(dt);
            }

            panel_detail.Visible = true;
            panel_detail.Enabled = false;
            panel_mt.Visible     = true;
            lbl_sertype.Enabled  = false;
            rtxb_mtmemo.Enabled  = false;
            DetailBtnVisible(true);
        }