tijian_tieying/web/Web/DocFile/TiKuShiJuanModify.aspx.cs

111 lines
3.9 KiB
C#
Raw Permalink Normal View History

2025-02-20 12:14:39 +08:00
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class DocFile_TiKuShiJuanModify : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ZWL.Common.PublicMethod.CheckSession();
ZWL.BLL.ERPTiKuShiJuan Model = new ZWL.BLL.ERPTiKuShiJuan();
Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
this.txtShiJuanTitle.Text=Model.ShiJuanTitle.ToString();
this.RadioButtonList1.SelectedValue=Model.IFSuiJiChuTi.ToString();
//this.txtFenLeiShunXu.Text=Model.FenLeiShunXu.ToString();
string[] MyShunXu=Model.FenLeiShunXu.ToString().Split('|');
for (int i = 0; i < MyShunXu.Length; i++)
{
this.ListBox2.Items.Add(MyShunXu[i].ToString());
}
this.txtKaoShiXianShi.Text=Model.KaoShiXianShi.ToString();
this.txtPanDuanFenShu.Text=Model.PanDuanFenShu.ToString();
this.txtDanXuanFenShu.Text=Model.DanXuanFenShu.ToString();
this.txtDuoXuanFenShu.Text=Model.DuoXuanFenShu.ToString();
this.txtTianKongFenShu.Text=Model.TianKongFenShu.ToString();
this.txtJianDaFenShu.Text=Model.JianDaFenShu.ToString();
this.txtBackInfo.Text=Model.BackInfo.ToString();
this.txtUserName.Text=Model.UserName.ToString();
this.txtTimeStr.Text=Model.TimeStr.ToString();
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
//<2F><>ȡ<EFBFBD><C8A1>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
string ShunXuStr = "";
for (int i = 0; i < ListBox2.Items.Count; i++)
{
if (ShunXuStr == "")
{
ShunXuStr = ListBox2.Items[i].Text;
}
else
{
ShunXuStr = ShunXuStr + "|" + ListBox2.Items[i].Text;
}
}
ZWL.BLL.ERPTiKuShiJuan Model = new ZWL.BLL.ERPTiKuShiJuan();
Model.ID = int.Parse(Request.QueryString["ID"].ToString());
Model.ShiJuanTitle=this.txtShiJuanTitle.Text.ToString();
Model.IFSuiJiChuTi=this.RadioButtonList1.SelectedItem.Text.ToString();
Model.FenLeiShunXu = ShunXuStr;
Model.KaoShiXianShi=int.Parse(this.txtKaoShiXianShi.Text);
Model.PanDuanFenShu=decimal.Parse(this.txtPanDuanFenShu.Text);
Model.DanXuanFenShu=decimal.Parse(this.txtDanXuanFenShu.Text);
Model.DuoXuanFenShu=decimal.Parse(this.txtDuoXuanFenShu.Text);
Model.TianKongFenShu=decimal.Parse(this.txtTianKongFenShu.Text);
Model.JianDaFenShu=decimal.Parse(this.txtJianDaFenShu.Text);
Model.BackInfo=this.txtBackInfo.Text.ToString();
Model.UserName=this.txtUserName.Text.ToString();
Model.TimeStr=DateTime.Parse(this.txtTimeStr.Text);
Model.Update();
//дϵͳ<CFB5><CDB3>־
ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
MyRiZhi.DoSomething = "<22>û<EFBFBD><C3BB>޸<EFBFBD><DEB8>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ(" + this.txtShiJuanTitle.Text + ")";
MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
MyRiZhi.Add();
ZWL.Common.MessageBox.ShowAndRedirect(this, "<22>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>޸ijɹ<C4B3><C9B9><EFBFBD>", "TiKuShiJuan.aspx");
}
protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
{
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>
ListItem li = ListBox2.SelectedItem;
int index = ListBox2.SelectedIndex;
if (index > 0)
{
ListBox2.Items.Remove(li);
//<2F><><EFBFBD><EFBFBD>
ListBox2.Items.Insert(index - 1, li);
}
}
protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
{
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>
ListItem li = ListBox2.SelectedItem;
int index = ListBox2.SelectedIndex;
if (index < ListBox2.Items.Count - 1 && index != -1)
{
ListBox2.Items.Remove(li);
//<2F><><EFBFBD><EFBFBD>
ListBox2.Items.Insert(index + 1, li);
}
}
}