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; }
private void AddProgressSetp(CheckInDT dt) { Sysdic staut = ScStautlist.Find(s => s.id == dt.GoodsStauts); StepItem item = new StepItem(staut.id.ToString(), staut.Dicval); item.Tag = dt; progressSteps.Items.Add(item); ratingStar.Rating = (int)dt.Rating; lbl_dtmemo.Text = dt.Meno; nud_cost.Value = (int)dt.ServerPay; progressSteps.Refresh(); }
private void ProgressStepsClick(object sender) { StepItem item = (StepItem)sender; CheckInDT dt = (CheckInDT)item.Tag; ratingStar.Rating = (int)dt.Rating; lbl_dtmemo.Text = dt.Meno; nud_cost.Value = (int)dt.ServerPay; int count = progressSteps.Items.Count; StepItem lastitem = (StepItem)progressSteps.Items[count - 1]; CheckInDT dTlast = (CheckInDT)lastitem.Tag; bool islast = dt.id == dTlast.id; DetailBtnVisible(islast); }
private int AddCheckInDT(CheckInDT checkInDT) { int id = checkInService.AddCheckInDT(checkInDT); if (id > 0) { checkInDT.id = id; ratingStar.Rating = (int)checkInDT.Rating; lbl_dtmemo.Text = checkInDT.Meno; AddProgressSetp(checkInDT); btn_creat.Visible = true; } else { ShowErrorMessageBox("添加失败"); } return(id); }
private void SaveData() { CheckInDT dT = new CheckInDT { Rating = ratingStar.Rating, CheckData = DateTime.Now.ToShortDateString(), CheckInID = checkinid, delflag = false, GoodsStauts = (int)Cmb_stauts.SelectedValue, Meno = rtxb_memo.Text.Trim(), ServerPay = (int)nud_cost.Value }; int id = addCheckIn(dT); if (id > 0) { this.Close(); } }