protected void jczl_tj(object sender, EventArgs e) { if (Context.Request["tj_pd"].ToString() == "tj_true") { JinChuModel jinchu = new JinChuModel(); row_count = jinchu.getList(user.gongsi).Count; List <yh_jinxiaocun_jichuziliao> list_jczl = new List <yh_jinxiaocun_jichuziliao>(); for (int i = 1; i < (Convert.ToInt32(Context.Request["row_i"].ToString()) - row_count); i++) { yh_jinxiaocun_jichuziliao zaji = new yh_jinxiaocun_jichuziliao(); zaji.sp_dm = Context.Request["sp_dm" + i].ToString(); zaji.name = Context.Request["name" + i].ToString(); zaji.lei_bie = Context.Request["lei_bie" + i].ToString(); zaji.dan_wei = Context.Request["dan_wei" + i].ToString(); zaji.shou_huo = Context.Request["shou_huo" + i].ToString(); zaji.gong_huo = Context.Request["Gong_huo" + i].ToString(); zaji.zh_name = user.name; zaji.gs_name = user.gongsi; list_jczl.Add(zaji); } if (list_jczl.Count > 0) { jinchu.add(list_jczl); } for (int i = 0; i < row_count; i++) { jinchu.update(Context.Request["sp_dm_cs" + i].ToString(), Context.Request["name_cs" + i].ToString(), Context.Request["lei_bie_cs" + i].ToString(), Context.Request["dan_wei_cs" + i].ToString(), Context.Request["shou_huo_cs" + i].ToString(), Context.Request["gong_huo_cs" + i].ToString(), Context.Request["id_cs" + i].ToString()); } jczl_select_load(sender, e); Response.Write(" <script>alert('提交成功'); location='ji_chu_zi_liao_page.aspx';</script>"); } }
public int del_jczl_ff(int id) { JinChuModel jinchu = new JinChuModel(); int isrun = jinchu.delete(id); return(isrun); }
protected void jczl_select_load(object sender, EventArgs e) { try { JinChuModel jinchu = new JinChuModel(); Session["jczj_select"] = jinchu.getList(user.gongsi); } catch { Response.Write("<script>alert('网络错误,请稍后再试!');</script>"); } }
protected void jczl_chaxun(object sender, EventArgs e) { try { string name = Request.Form["jichu_cx"]; JinChuModel jinchu = new JinChuModel(); Session["jczj_select"] = jinchu.getList_chaxun(user.gongsi, name); } catch { Response.Write("<script>alert('网络错误,请稍后再试!');</script>"); } }
public static string getNewSp() { try { JinChuModel jinChuModel = new JinChuModel(); List <JinChuZiLiaoItem> list = jinChuModel.getSetStockDetail(user.gongsi); JavaScriptSerializer js = new JavaScriptSerializer(); return(js.Serialize(list)); } catch { return(string.Empty); } }
protected void del_qichu(object sender, EventArgs e) { JinChuModel jinchu = new JinChuModel(); List <yh_jinxiaocun_jichuziliao> list = jinchu.getList(user.gongsi); row_count = list.Count; for (int i = 0; i < row_count; i++) { string name = Request["Checkbox_bd" + i]; if (name != null) { if (Convert.ToInt32(name) == i) { del_jczl_ff(list[i].id); jczl_select_load(sender, e); Response.Write(" <script>alert('删除成功'); location='ji_chu_zi_liao_page.aspx';</script>"); } } } }
protected void Page_Load(object sender, EventArgs e) { user = (yh_jinxiaocun_user)Session["user"]; if (user.AdminIS.Equals("false")) { Response.Redirect("~/wqx.aspx"); } if (user != null) { page.countPage = this.select_row(); shuaxin(); this.dj_row.Attributes.Add("onclick", "javascript:pd_tj_ff();"); string act = Request["act"] == null ? "" : Request["act"].ToString(); if (act.Equals("PostUser")) { Response.Write(selectNameAndLebie(Request["id"].ToString())); Response.End(); } try { List <JinChuZiLiaoItem> list = Session["jichu"] as List <JinChuZiLiaoItem>; if (list == null) { JinChuModel jin = new JinChuModel(); Session["jichu"] = jin.getOutStockDetail(user.gongsi); } lblCurrentPage.Text = page.nowPage.ToString(); } catch { Response.Write("<script>alert('网络错误,请稍后再试!');</script>"); } } else { Response.Write("<script>alert('请登录!'); window.parent.location.href='/Myadmin/Login.aspx';</script>"); } }