Exemple #1
0
    //返回到借阅单
    protected void Button2_Click(object sender, EventArgs e)
    {
        DA_JieYuanBU jyue1 = new DA_JieYuanBU();
        string       id    = jyue1.GetIdBybill(Request.QueryString["bill"]);

        jyue1.Close();
        Response.Redirect("EditJieyueInfo.aspx?id=" + id, true);
    }
Exemple #2
0
    //确定文件的借阅
    protected void Button1_Click(object sender, EventArgs e)
    {
        string    Files = "";
        Hashtable ht    = new Hashtable();

        for (int i = 1; i < 6; i++)
        {
            string temp  = Util.GetControlValue(this.title1.Parent.FindControl("title" + i));
            string temp1 = Util.GetControlValue(this.title1.Parent.FindControl("ajnum" + i));
            if (temp.Trim() != "")
            {
                ht[temp.Trim()] = temp.Trim() + "_" + temp1.Trim();
            }
            if (temp != "" && temp1 == "")
            {
                if (Files == "")
                {
                    Files = i.ToString();
                }
                else
                {
                    Files = Files + "," + i;
                }
            }
        }

        if (ht.Count == 0)
        {
            Util.alert(this.Page, "错误提示:你至少需要输入一个文件名称");
        }
        else
        {
            if (Files != "")
            {
                Util.alert(this.Page, "错误提示:请检查文件" + Files + "是否输入档案编号!");
            }
            else
            {
                DA_JieYuanBU jyue1  = new DA_JieYuanBU();
                string       result = jyue1.AddJyueFileData(Request.QueryString["bill"], ht);
                string       id     = jyue1.GetIdBybill(Request.QueryString["bill"]);
                jyue1.Close();
                if (result == null)
                {
                    PubComm.ShowInfo("提示:增加文件成功!", Application["root"] + "/DangAn/EditJieyueInfo.aspx?id=" + id);
                }
                else
                {
                    Util.alert(this.Page, result);
                }
            }
        }
    }
Exemple #3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     object[] obj0=new object[]{bill, billtime, billmen, zeren,paytime,remark };
     object[] obj1 = new object[] { bill, billtime, billmen, zeren, paytime};
     string[] info = new string[] { "单据编号", "开票时间", "开票员", "借阅人","要求归还时间" };
     bool check = true;
     for (int i = 0; i < info.Length; i++)
     {
         if(Util.GetControlValue((Control)obj1[i])==null || Util.GetControlValue((Control)obj1[i])=="")
         {
             check =false;
             Util.alert(this.Page,"错误提示:【" + info[i] + "】栏目不能为空!");
             break;
         }
     }
     if(check)
     {
         try
         {
             Hashtable ht=new Hashtable();
             Util.getPageData(obj0,ht);
             //ht.Add("status", "0");
             DA_JieYuanBU jyue1=new DA_JieYuanBU();
             jyue1.TabCommand.InsertData(ht);
             jyue1.Close();
             Util.alert(this.Page,"增加借阅单成功!");
             DA_JieYuanBU jyue2 = new DA_JieYuanBU();
             string id= jyue2.GetIdBybill(this.bill.Text.ToString());
             Response.Redirect("EditJieYueInfo.aspx?id="+id);
         }
         catch
         {
             Util.alert(this.Page, "错误提示:增加资产数据失败,可能的原因是数据类型有错误,请检查后重新输入!");
         }
     }
 }