Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int            id = Convert.ToInt32(Request.QueryString["id"].ToString());
         Model.OrderTab or = ot.GetModel(id);
         Label1.Text = or.OrderNumber;
         if (or.PhotoID1 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID1));
             ImageButton1.ImageUrl = ph.Photourl;
         }
         if (or.PhotoID2 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID2));
             ImageButton2.ImageUrl = ph.Photourl;
         }
         if (or.PhotoID3 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID3));
             ImageButton3.ImageUrl = ph.Photourl;
         }
         if (or.PhotoID4 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID4));
             ImageButton4.ImageUrl = ph.Photourl;
         }
         Label3.Text  = or.alllength.ToString();
         Label4.Text  = or.Imperial.ToString();
         Label5.Text  = or.QhWidth.ToString();
         Label6.Text  = or.Beizhuzz;
         Label7.Text  = or.Zengsong;
         Label8.Text  = or.MemberName;
         Label9.Text  = or.MemberPhone;
         Label10.Text = or.MemberPhone1;
         Label11.Text = or.MemberAdd;
         Label12.Text = Convert.ToDateTime(or.validity).ToString("yyyy-MM-dd");
         Label13.Text = or.AllMoney.ToString();
         Label14.Text = or.Deposit.ToString();
         Maticsoft.Model.Homemadetab ho = hot.GetModel(Convert.ToInt32(or.HomemadeID));
         ImageButton5.ImageUrl = ho.Photourl;
         if (or.Zhuangtai2 == 1)
         {
             Label15.Text = "未付全款";
         }
         else if (or.Zhuangtai2 == 2)
         {
             Label15.Text = "已付全款";
         }
         else
         {
             Label15.Text = "状态异常";
         }
     }
 }
Пример #2
0
 /// <summary>
 /// 下单
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void LinkButton3_Click(object sender, EventArgs e)
 {
     try
     {
         //获取button 控件
         LinkButton lb = (LinkButton)sender;
         //获取传过来的commwntid
         int            id = Convert.ToInt32(lb.CommandArgument);
         Model.OrderTab or = ot.GetModel(id);
         if (or.progress <= 1)
         {
             or.Zhuangtai1 = 1;
             or.progress   = 1;
             bool a = ot.Update(or);
             if (a == true)
             {
                 ClientScript.RegisterClientScriptBlock(this.GetType(), "this", "<script language=javascript>alert('下单成功');</script>");
                 bind(sql);
             }
             else
             {
                 ClientScript.RegisterClientScriptBlock(this.GetType(), "this", "<script language=javascript>alert('下单失败');</script>");
             }
         }
         else
         {
             ClientScript.RegisterClientScriptBlock(this.GetType(), "this", "<script language=javascript>alert('该步奏已经执行过了');</script>");
         }
     }
     catch (Exception ee)
     {
         //Response.Write("<script>alert('确定异常 " + ee.Message + "')</script>");
         ClientScript.RegisterClientScriptBlock(this.GetType(), "this", "<script language=javascript>alert('下单异常 " + ee.Message + "');</script>");
     }
 }
Пример #3
0
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void LinkButton2_Click(object sender, EventArgs e)
 {
     try
     {
         //获取button 控件
         LinkButton lb = (LinkButton)sender;
         //获取传过来的commwntid
         int            id = Convert.ToInt32(lb.CommandArgument);
         Model.OrderTab er = ot.GetModel(id);
         if (er.Zhuangtai1 != 1)
         {
             Response.Redirect("danjuupdate.aspx?id=" + id + "");
         }
         else
         {
             ClientScript.RegisterClientScriptBlock(this.GetType(), "this", "<script language=javascript>alert('该单据已过审核无法修改');</script>");
         }
     }
     catch (Exception ee)
     {
         //Response.Write("<script>alert('确定异常 " + ee.Message + "')</script>");
         ClientScript.RegisterClientScriptBlock(this.GetType(), "this", "<script language=javascript>alert('跳转修改异常 " + ee.Message + "');</script>");
     }
 }
Пример #4
0
 private void ShowInfo(int id)
 {
     Maticsoft.BLL.OrderTab   bll   = new Maticsoft.BLL.OrderTab();
     Maticsoft.Model.OrderTab model = bll.GetModel(id);
     this.lblid.Text              = model.id.ToString();
     this.lblMemberID.Text        = model.MemberID.ToString();
     this.lblMemberName.Text      = model.MemberName;
     this.lblMemberPhone.Text     = model.MemberPhone;
     this.lblMemberPhone1.Text    = model.MemberPhone1;
     this.lblMemberAdd.Text       = model.MemberAdd;
     this.lblOrderdate.Text       = model.Orderdate.ToString();
     this.lblOrderNumber.Text     = model.OrderNumber;
     this.lblStaffmemberID.Text   = model.StaffmemberID.ToString();
     this.lblStaffmembername.Text = model.Staffmembername;
     this.lblUserTabID.Text       = model.UserTabID.ToString();
     this.lblPhotoID.Text         = model.PhotoID.ToString();
     this.lblvalidity.Text        = model.validity.ToString();
     this.lblprogress.Text        = model.progress.ToString();
     this.lblDeposit.Text         = model.Deposit.ToString();
     this.lblAllMoney.Text        = model.AllMoney.ToString();
     this.lblalllength.Text       = model.alllength.ToString();
     this.lblImperial.Text        = model.Imperial.ToString();
     this.lblQhWidth.Text         = model.QhWidth.ToString();
     this.lblBeizhuwg.Text        = model.Beizhuwg;
     this.lblBeizhuzz.Text        = model.Beizhuzz;
     this.lblZengsong.Text        = model.Zengsong;
     this.lblZhuangtai1.Text      = model.Zhuangtai1.ToString();
     this.lblZhuangtai2.Text      = model.Zhuangtai2.ToString();
     this.lblBy1.Text             = model.By1.ToString();
     this.lblBy2.Text             = model.By2.ToString();
     this.lblBy3.Text             = model.By3.ToString();
     this.lblBy4.Text             = model.By4;
     this.lblBy5.Text             = model.By5;
     this.lblBy6.Text             = model.By6;
     this.lblBy7.Text             = model.By7;
 }
Пример #5
0
 Maticsoft.BLL.Homemadetab hot  = new BLL.Homemadetab();  //自制商品
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int            id = Convert.ToInt32(Request.QueryString["id"].ToString());
         Model.OrderTab or = ot.GetModel(id);
         Label1.Text = or.OrderNumber;
         if (or.PhotoID1 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID1));
             ImageButton1.ImageUrl = ph.Photourl;
         }
         if (or.PhotoID2 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID2));
             ImageButton2.ImageUrl = ph.Photourl;
         }
         if (or.PhotoID3 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID3));
             ImageButton3.ImageUrl = ph.Photourl;
         }
         if (or.PhotoID4 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(or.PhotoID4));
             ImageButton4.ImageUrl = ph.Photourl;
         }
         Label3.Text  = or.alllength.ToString();
         Label4.Text  = or.Imperial.ToString();
         Label5.Text  = or.QhWidth.ToString();
         Label6.Text  = or.Beizhuzz;
         Label7.Text  = or.Zengsong;
         Label8.Text  = or.MemberName;
         Label9.Text  = or.MemberPhone;
         Label10.Text = or.MemberPhone1;
         Label11.Text = or.MemberAdd;
         Label12.Text = Convert.ToDateTime(or.validity).ToString("yyyy-MM-dd");
         Label13.Text = or.AllMoney.ToString();
         Label14.Text = or.Deposit.ToString();
         Label15.Text = or.Beizhuwg;
         Maticsoft.Model.Homemadetab ho = hot.GetModel(Convert.ToInt32(or.HomemadeID));
         ImageButton5.ImageUrl = ho.Photourl;
         if (or.Zhuangtai2 == 1)
         {
             Label23.Text = "未付全款";
         }
         else if (or.Zhuangtai2 == 2)
         {
             Label23.Text = "已付全款";
         }
         else
         {
             Label23.Text = "状态异常";
         }
         DataSet ds = ct.GetList(" OrderNumber like '" + Label1.Text + "'");
         if (ds.Tables[0].Rows.Count > 0)
         {
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                 Model.ContractTab con = ct.GetModel(Convert.ToInt32(ds.Tables[0].Rows[i]["id"]));
                 if (con.By1 == 1)
                 {
                     Label16.Text = con.CommodityID;
                 }
                 else if (con.By1 == 2)
                 {
                     Label17.Text = con.CommodityID;
                 }
                 else if (con.By1 == 3)
                 {
                     Label18.Text = con.CommodityID;
                 }
                 else if (con.By1 == 4)
                 {
                     Label19.Text = con.CommodityID;
                 }
                 else if (con.By1 == 5)
                 {
                     Label20.Text = con.CommodityID;
                 }
                 else if (con.By1 == 6)
                 {
                     Label21.Text = con.CommodityID;
                 }
                 else if (con.By1 == 7)
                 {
                     Label22.Text = con.CommodityID;
                 }
                 else
                 {
                 }
                 if (i == ds.Tables[0].Rows.Count - 1)
                 {
                     if (Label16.Text == "")
                     {
                         Label16.Text = "无";
                     }
                     if (Label17.Text == "")
                     {
                         Label17.Text = "无";
                     }
                     if (Label18.Text == "")
                     {
                         Label18.Text = "无";
                     }
                     if (Label19.Text == "")
                     {
                         Label19.Text = "无";
                     }
                     if (Label20.Text == "")
                     {
                         Label20.Text = "无";
                     }
                     if (Label21.Text == "")
                     {
                         Label21.Text = "无";
                     }
                     if (Label22.Text == "")
                     {
                         Label22.Text = "无";
                     }
                 }
             }
         }
         else
         {
             Label16.Text = "无";
             Label17.Text = "无";
             Label18.Text = "无";
             Label19.Text = "无";
             Label20.Text = "无";
             Label21.Text = "无";
             Label22.Text = "无";
         }
     }
 }
Пример #6
0
 static int zzspid = 0; //自制商品ID
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         id = Convert.ToInt32(Request.QueryString["id"].ToString());
         bind();
         bind1();
         Model.OrderTab ord = ot.GetModel(id);
         Label1.Text = ord.OrderNumber;
         if (ord.PhotoID1 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(ord.PhotoID1));
             ImageButton1.ImageUrl = ph.Photourl;
             tp1 = ph.id;
         }
         if (ord.PhotoID2 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(ord.PhotoID2));
             ImageButton2.ImageUrl = ph.Photourl;
             tp2 = ph.id;
         }
         if (ord.PhotoID3 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(ord.PhotoID3));
             ImageButton3.ImageUrl = ph.Photourl;
             tp3 = ph.id;
         }
         if (ord.PhotoID4 != 0)
         {
             Model.phototab ph = pt.GetModel(Convert.ToInt32(ord.PhotoID4));
             ImageButton4.ImageUrl = ph.Photourl;
             tp4 = ph.id;
         }
         TextBox1.Text  = ord.alllength.ToString();
         TextBox2.Text  = ord.Imperial.ToString();
         TextBox3.Text  = ord.QhWidth.ToString();
         TextBox4.Text  = ord.Beizhuzz;
         TextBox5.Text  = ord.Beizhuwg;
         TextBox6.Text  = ord.Zengsong;
         TextBox7.Text  = ord.MemberName;
         TextBox8.Text  = ord.MemberPhone;
         TextBox9.Text  = ord.MemberPhone1;
         TextBox10.Text = ord.MemberAdd;
         TextBox11.Text = Convert.ToDateTime(ord.validity).ToString("yyyy-MM-dd");
         TextBox12.Text = ord.AllMoney.ToString();
         Label4.Text    = ord.Deposit.ToString();
         Model.Homemadetab hom = ht.GetModel(Convert.ToInt32(ord.HomemadeID));
         zzspid = hom.id;
         ImageButton5.ImageUrl = hom.Photourl;
         DataSet ds = ct.GetList(" OrderNumber like '" + Label1.Text + "'");
         if (ds.Tables[0].Rows.Count > 0)
         {
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                 Model.ContractTab con = ct.GetModel(Convert.ToInt32(ds.Tables[0].Rows[i]["id"]));
                 if (con.By1 == 1)
                 {
                     TextBox14.Text = con.CommodityID;
                 }
                 else if (con.By1 == 2)
                 {
                     TextBox15.Text = con.CommodityID;
                 }
                 else if (con.By1 == 3)
                 {
                     TextBox16.Text = con.CommodityID;
                 }
                 else if (con.By1 == 4)
                 {
                     TextBox17.Text = con.CommodityID;
                 }
                 else if (con.By1 == 5)
                 {
                     TextBox18.Text = con.CommodityID;
                 }
                 else if (con.By1 == 6)
                 {
                     TextBox19.Text = con.CommodityID;
                 }
                 else if (con.By1 == 7)
                 {
                     TextBox20.Text = con.CommodityID;
                 }
                 else
                 {
                 }
             }
         }
     }
 }