public ActionResult FindQuotationMst(int QuotationId) { //if (QuotationId > 0) //{ // Quotation_QuotationMst dtl = db.Quotation_QuotationMst.Find(QuotationId); // return Json(dtl, JsonRequestBehavior.AllowGet); //} QuotationMstDto mst = quotationService.QuotationSearchById(QuotationId.ToString(), UserInfo.UserId).FirstOrDefault(); return(Json(mst, JsonRequestBehavior.AllowGet)); }
private int SaveQuotationMst(string GroupId, string ProjectId, string SupplierId, string QuotationType) { var mstDto = new QuotationMstDto(); mstDto.QuotationId = ""; mstDto.GroupId = GroupId; mstDto.ProjectId = ProjectId; mstDto.SupplierId = SupplierId; mstDto.QuotationType = QuotationType; int QuotationId = quotationService.QuotationSave(mstDto, UserInfo.UserId); return(QuotationId); }
private int SaveQuotationMst(string QuotationType, string ProjectId, string SupplierId, string GroupId) { var mstDto = new QuotationMstDto() { QuotationId = "0", GroupId = GroupId, QuotationType = QuotationType, ProjectId = ProjectId, SupplierId = SupplierId }; int QuotationId = quotationService.QuotationSave(mstDto, UserInfo.UserId); return(QuotationId); }
private int SaveQuotationMst(string QuotationType, int ProjectId, int SupplierId) { int QuotationId = 0; ////查询mst中 某供应商,某项目,此确认单类型是否已保存过 //var mst = db.Quotation_QuotationMst.Where(x => x.QuotationType == QuotationType && x.ProjectId == ProjectId && x.SupplierId == SupplierId && x.Status != "取消").FirstOrDefault(); //if (mst != null) //{ // QuotationId = mst.Id; //} //else { var mstDto = new QuotationMstDto(); TryUpdateModel <QuotationMstDto>(mstDto); QuotationId = quotationService.QuotationSave(mstDto, UserInfo.UserId); } return(QuotationId); }