private void 除寄存ToolStripMenuItem_Click(object sender, EventArgs e) { JCInfoModel model = (JCInfoModel)dataGridView1.SelectedRows[0].DataBoundItem; caocuofrom caozuo = caocuofrom.Create(deletePassword, model.jcID.ToString()); caozuo.Show(); }
//统计报表中的 店内完成统计 public List <JCInfoModel> YGFinish(string begindate, string enddate, string dpname) { List <JCInfoModel> list = new List <JCInfoModel>(); JCInfoModel model; string str = ""; //string dpnam = FilterClass.DianPu1.UserName.Trim(); if (dpname == "") { str = "select a.*,b.Name from JCInfoTable" + ID + " as a join YGFinish" + ID + " as b on a.jcID=b.JCID where b.DateTime between '" + begindate + "' and '" + enddate + "'"; } else if (dpname == "全部") { foreach (KeyValuePair <string, int> iteam in FilterClass.dic) { str += "select a.*,b.Name from "; str += "JCInfoTable" + iteam.Value + " as a join YGFinish" + iteam.Value + " as b on a.jcID=b.JCID "; str += " where b.DateTime between '" + begindate + "' and '" + enddate + "'"; str += " union all "; } str = str.Substring(0, str.Length - 10); } else { int id = FilterClass.dic[dpname]; str = "select a.*,b.Name from JCInfoTable" + id + " as a join YGFinish" + id + " as b on a.jcID=b.JCID where b.DateTime between '" + begindate + "' and '" + enddate + "'"; } SqlDataReader read = SqlHelper.ExecuteReader(str); while (read.Read()) { if (read.HasRows) { model = new JCInfoModel(); model.jcNo = Convert.ToInt32(read["XYF"]); model.jcID = Convert.ToInt32(read["jcID"]); model.jcCardNumber = read["jcCardNumber"].ToString(); model.jcName = read["jcName"].ToString(); model.jcQMoney = read["jcQMoney"].ToString(); model.jcType = read["jcType"].ToString(); model.jcPinPai = read["jcPinPai"].ToString(); model.jcColor = read["jcColor"].ToString(); model.jcStaff = read["jcStaff"].ToString(); model.jcBeginDate = read["jcBeginDate"].ToString(); model.jcEndDate = read["jcEndDate"].ToString(); model.jcZT = read["jcZT"].ToString(); model.jcAddress = read["jcAddress"].ToString(); model.jcImgUrl = read["jcImgUrl"].ToString(); model.jcDanNumber = read["jcDanNumber"].ToString(); model.jcPaiNumber = read["jcPaiNumber"].ToString(); model.jcRemark = read["jcRemark"].ToString(); model.jcPression = read["Name"].ToString(); model.jcQuestion = read["jcQuestion"].ToString(); model.lsdm = read["DPName"].ToString(); list.Add(model); } } return(list); }
private void 取消取走ToolStripMenuItem_Click(object sender, EventArgs e) { JCInfoModel model = (JCInfoModel)dataGridView1.SelectedRows[0].DataBoundItem; if (model.jcZT == "未取走") { MessageBox.Show("该物品并未取走,不能执行此操作!"); return; } caocuofrom caozuo = caocuofrom.Create(updateZT, model.jcID.ToString()); caozuo.Show(); }
/// <summary> /// 取走导出 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="list"></param> /// <param name="sheet"></param> /// <returns></returns> //private static IWorkbook quzoufopirent<T>(List<T> list, ISheet sheet) //{ // int rowIndex = 0; // IRow row = sheet.CreateRow(rowIndex); // #region MyRegion//表头 // row.CreateCell(0).SetCellValue("会员卡号"); // row.CreateCell(1).SetCellValue("会员姓名"); // row.CreateCell(2).SetCellValue("欠款金额"); // row.CreateCell(3).SetCellValue("寄存类型"); // row.CreateCell(4).SetCellValue("寄存品牌"); // row.CreateCell(5).SetCellValue("寄存颜色"); // row.CreateCell(6).SetCellValue("服务类型"); // row.CreateCell(7).SetCellValue("寄存时间"); // row.CreateCell(8).SetCellValue("取走时间"); // row.CreateCell(9).SetCellValue("物品状态"); // row.CreateCell(10).SetCellValue("消费单号"); // row.CreateCell(11).SetCellValue("备注"); // row.CreateCell(12).SetCellValue("常见问题"); // row.CreateCell(13).SetCellValue("业务员"); // row.CreateCell(14).SetCellValue("店铺名称"); // rowIndex++; // #endregion // foreach (T item in list) // { // JCInfoModel model = item as JCInfoModel; // //每遍历一条数据创建一行 // row = sheet.CreateRow(rowIndex); // //创建行中的单元格 // row.CreateCell(0).SetCellValue(model.jcCardNumber); // row.CreateCell(1).SetCellValue(model.jcName); // row.CreateCell(2).SetCellValue(model.jcQMoney); // row.CreateCell(3).SetCellValue(model.jcType); // row.CreateCell(4).SetCellValue(model.jcPinPai); // row.CreateCell(5).SetCellValue(model.jcColor); // row.CreateCell(6).SetCellValue(model.jcType); // row.CreateCell(7).SetCellValue(model.jcBeginDate); // row.CreateCell(8).SetCellValue(model.jcEndDate); // row.CreateCell(9).SetCellValue(model.jcAddress); // row.CreateCell(10).SetCellValue(model.jcDanNumber); // row.CreateCell(11).SetCellValue(model.jcRemark); // row.CreateCell(12).SetCellValue(model.jcQuestion); // row.CreateCell(13).SetCellValue(model.jcPression); // row.CreateCell(14).SetCellValue(model.lsdm); // rowIndex++; // } // return sheet.Workbook; //} /// <summary> /// 寄存导出 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="list"></param> /// <param name="sheet"></param> /// <returns></returns> private static IWorkbook jcinfopirent <T>(List <T> list, ISheet sheet) { int rowIndex = 0; IRow row = sheet.CreateRow(rowIndex); #region MyRegion//表头 row.CreateCell(0).SetCellValue("会员卡号"); row.CreateCell(1).SetCellValue("会员姓名"); row.CreateCell(2).SetCellValue("欠款金额"); row.CreateCell(3).SetCellValue("寄存类型"); row.CreateCell(4).SetCellValue("寄存品牌"); row.CreateCell(5).SetCellValue("寄存颜色"); row.CreateCell(6).SetCellValue("服务类型"); row.CreateCell(7).SetCellValue("寄存时间"); row.CreateCell(8).SetCellValue("取走时间"); row.CreateCell(9).SetCellValue("物品状态"); row.CreateCell(10).SetCellValue("消费单号"); row.CreateCell(11).SetCellValue("备注"); row.CreateCell(12).SetCellValue("常见问题"); row.CreateCell(13).SetCellValue("业务员"); row.CreateCell(14).SetCellValue("店铺名称"); rowIndex++; #endregion foreach (T item in list) { JCInfoModel model = item as JCInfoModel; //每遍历一条数据创建一行 row = sheet.CreateRow(rowIndex); //创建行中的单元格 row.CreateCell(0).SetCellValue(model.jcCardNumber); row.CreateCell(1).SetCellValue(model.jcName); row.CreateCell(2).SetCellValue(model.jcQMoney); row.CreateCell(3).SetCellValue(model.jcType); row.CreateCell(4).SetCellValue(model.jcPinPai); row.CreateCell(5).SetCellValue(model.jcColor); row.CreateCell(6).SetCellValue(model.jcType); row.CreateCell(7).SetCellValue(model.jcBeginDate); row.CreateCell(8).SetCellValue(model.jcEndDate); row.CreateCell(9).SetCellValue(model.jcAddress); row.CreateCell(10).SetCellValue(model.jcDanNumber); row.CreateCell(11).SetCellValue(model.jcRemark); row.CreateCell(12).SetCellValue(model.jcQuestion); row.CreateCell(13).SetCellValue(model.jcPression); row.CreateCell(14).SetCellValue(model.lsdm); rowIndex++; } return(sheet.Workbook); }
private void UpdatejcFrom_Load(object sender, EventArgs e) { model = bll.SelectID(id); textBox1.Text = model.jcName; //textBox2.Text = "未上架"; textBox3.Text = model.jcCardNumber; textBox4.Text = model.jcPinPai; //textBox5.Text = model.jcPaiNumber; textBox6.Text = model.jcColor; textBox7.Text = model.jcBeginDate; textBox8.Text = model.jcQMoney.Trim(); textBox9.Text = model.jcType; textBox10.Text = model.jcStaff; textBox11.Text = model.jcRemark; pictureBox1.ImageLocation = model.jcImgUrl; }
public bool addJCList(List <shInfoList> list, string cardno, string name, string enddate, string danNumber, string Tel, string nowdate) { List <JCInfoModel> list1 = new List <JCInfoModel>(); JCInfoModel model; foreach (var iteam in list) { model = new JCInfoModel(); model.jcCardNumber = cardno; model.jcName = name; if (iteam.FuKuan) { model.jcQMoney = "0"; } else { model.jcQMoney = iteam.YMoney.ToString(); } model.Tel = Tel; model.jcType = iteam.Type; model.jcNo = Convert.ToInt32(iteam.CountMoney); model.jcPinPai = iteam.PinPai; model.jcColor = iteam.Color; model.jcStaff = iteam.Type + ":" + iteam.FuWuName; model.jcBeginDate = nowdate; model.jcEndDate = enddate; model.jcZT = "未取走"; model.jcAddress = "在店中"; model.jcImgUrl = iteam.ImgUrl == null ? "" : iteam.ImgUrl; model.jcDanNumber = danNumber; model.jcPaiNumber = iteam.PaiNumber; model.jcRemark = iteam.Remark; model.jcQuestion = iteam.CJQuestion; model.jcPression = iteam.YMPerson; list1.Add(model); } return(dal.addJCList(list1)); }
public bool UpdateInfoModel(JCInfoModel model) { return(dal.UpdateInfoModel(model)); }