protected void Button2_Click(object sender, EventArgs e) { try { string filetype = Path.GetExtension(file1.PostedFile.FileName); string filename = Path.GetFileNameWithoutExtension(file1.PostedFile.FileName); //文件名; string newfilename = ltlzsh.Text + filetype; //+ string path = "~/files/"; string savepath = System.Web.HttpContext.Current.Server.MapPath(path) + newfilename; file1.PostedFile.SaveAs(savepath); string dz = path + newfilename; Bll_TRC_ROLL_PRODCUT trc_roll_prodcut = new Bll_TRC_ROLL_PRODCUT(); if (trc_roll_prodcut.UpdateZZSPDF(ltlpk.Text, ltlzsh.Text, dz)) { Response.Write("<script>alert('上传成功');window.parent.document.getElementById('imgbtnJz').click();window.parent.close();</script>"); } } catch (Exception ex) { WebMsg.MessageBox(ex.Message); } }
public ViewResult InventoryDetail(InventoryDetailCondition condition, string errorMsg = "", bool isrefreshCondition = false) { if (isrefreshCondition) { condition = TempData["INVENTORY_DETIAL_CONDITION"] as InventoryDetailCondition; } if (string.IsNullOrEmpty(errorMsg) == false) { ViewBag.ErrorMsg = errorMsg; } // 库存钢材信息 var batchInfo = new Bll_TRC_ROLL_PRODCUT().GetByBatchNo( condition?.batchNo, condition?.gz, condition?.zxbz, condition?.wl, condition?.ck, condition?.zldj, condition?.bzyq, true).OrderBy(w => w.C_ID).ToList(); ViewBag.ListData = batchInfo; TempData["INVENTORY_DETIAL_CONDITION"] = condition; return(View()); }
public RedirectToRouteResult UpdateToNcBatchNo(InventoryDetailCondition condition) { try { // 库存钢材信息 var batchInfo = new Bll_TRC_ROLL_PRODCUT().GetByBatchNo( condition?.batchNo, condition?.gz, condition?.zxbz, condition?.wl, condition?.ck, condition?.zldj, condition?.bzyq, true).OrderBy(w => w.C_ID).ToList(); bll.UpdateToNcBatchNo(condition?.ck, condition?.gz, condition?.zxbz, condition?.gg, condition?.batchNo, condition?.wl, condition?.zldj, condition?.bzyq, batchInfo); } catch (Exception ex) { ViewBag.ErrorMsg = ex.Message; } return(RedirectToAction(nameof(InventoryManager), new { errorMsg = ViewBag.ErrorMsg, isloadCondition = true, })); }
protected void btnAdd_Click(object sender, EventArgs e) { try { Mod_TMD_HY_PLAN mod = new Mod_TMD_HY_PLAN(); if (string.IsNullOrEmpty(ltlID.Text)) { Bll_TRC_ROLL_PRODCUT trc_roll_prodcut = new Bll_TRC_ROLL_PRODCUT(); trc_roll_prodcut.ExeProc();//执行钢坯/线材库存类型 } mod.C_TYPE = ltlID.Text == "" ? "N" : "Y"; mod.C_REMARK = txtRemark.Text; mod.C_EMP_NAME = ltlEmpName.Text; mod.D_DT = Convert.ToDateTime(txtStart.Value); mod.C_ID = ltlID.Text; if (tmd_hy_plan.Insert_Update(mod)) { WebMsg.MessageBox("保存成功"); GetList(); } } catch (Exception ex) { WebMsg.MessageBox(ex.Message); } }