Ejemplo n.º 1
0
        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>");
            }
        }
Ejemplo n.º 2
0
 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>");
     }
 }
Ejemplo n.º 3
0
        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>");
                    }
                }
            }
        }