private void save() { #region produceNotice ProduceNotice produceNotice = new ProduceNotice(); produceNotice.spId = long.Parse(dgv_proportion.SelectedRows[0].Cells["id"].Value.ToString()); produceNotice.inputDate = DateTime.Now; produceNotice.inputMan = this.UserName; produceNotice.notifyDate = DateTime.Parse(dtp_notify.Value.ToShortDateString()); produceNotice.notifyMan = txt_notifyMan.Text.ToString().Trim(); produceNotice.planQuantity = decimal.Parse(txt_planQuantity.Text.ToString().Trim()); produceNotice.ptId = long.Parse(cmb_produceTeam.SelectedValue.ToString().Trim()); produceNotice.remark = txt_ps.Text.ToString().Trim(); produceNotice.startDate = DateTime.Parse(dtp_start.Value.ToShortDateString()); #endregion #region sendproportion SendProportion sendProportion = new SendProportion(); sendProportion.id = long.Parse(dgv_proportion.SelectedRows[0].Cells["id"].Value.ToString()); sendProportion.inputMan = this.UserName; #endregion producePlan.saveProduceNotice(produceNotice, sendProportion, null, null, null); }
/// <summary> /// 保存生产通知单 /// </summary> /// <param name="producenotice">通知单对象</param> /// <param name="sendproportion">发送通知单对象</param> /// <param name="producesendProportionDetail">生产配合比发送明细</param> /// <param name="targetsendProportionDetail">目标配合比发送明细</param> /// <param name="sendproportionDetail">配合比明细</param> /// <returns>True:成功 false:失败</returns> public bool saveProduceNotice(ProduceNotice producenotice, SendProportion sendproportion, ProduceSendProportionDetail producesendProportionDetail, TargetSendProportionDetail targetsendProportionDetail, SendProportionDetail sendproportionDetail) { return(producePlanDB.saveProduceNotice(producenotice, sendproportion, producesendProportionDetail, targetsendProportionDetail, sendproportionDetail)); }