0316-002-gaofei

This commit is contained in:
gaofei 2022-03-16 15:27:47 +08:00
parent ab09cf21d2
commit 1ca2236fc9
1 changed files with 85 additions and 85 deletions

View File

@ -57,7 +57,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
}
}
public static DataTable Table=new DataTable ();
public static DataTable Table = new DataTable();
private static List<Model.GJSX_detail> GJSX_detail = new List<Model.GJSX_detail>();
#endregion
@ -72,7 +72,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
if (!IsPostBack)
{
string EditType = Request.Params["EditType"];
string ID= Request.Params["ID"];
string ID = Request.Params["ID"];
Table = null;
UnitService.InitUnitDropDownList(this.DropUnitId, this.CurrUser.LoginProjectId, false);
//专业
@ -90,7 +90,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
UserService.InitUserDropDownList(DropNextRecipient, CurrUser.LoginProjectId, false, string.Empty);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
if (EditType=="add")
if (EditType == "add")
{
txtGJSXID.Readonly = true;
txtUserID.Readonly = true;
@ -143,7 +143,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
TextIsEnable(false); //使文本不可编辑
Model.GJSX gjsx= BLL.GJSXService.GetGJSXById(ID);
Model.GJSX gjsx = BLL.GJSXService.GetGJSXById(ID);
List<SqlParameter> listStr = new List<SqlParameter>();
string projectId = this.CurrUser.LoginProjectId;
if (gjsx != null)
@ -190,7 +190,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
}
if (this.CurrUser.UserId==BLL.Const.sysglyId||this.CurrUser.UserId==BLL.Const.SystemManager)//如果当前登录人是管理员
if (this.CurrUser.UserId == BLL.Const.sysglyId || this.CurrUser.UserId == BLL.Const.SystemManager)//如果当前登录人是管理员
{
TextIsEnable(true);
txtGJSXID.Readonly = true;
@ -201,7 +201,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
if (gjsx.UserID == this.CurrUser.UserId) //如果当前登录人是提出人
{
rblIsClosed.Visible = false;
if (BLL.GJSXService.GetGJSXById(txtGJSXID.Text).State.Trim()=="1")
if (BLL.GJSXService.GetGJSXById(txtGJSXID.Text).State.Trim() == "1")
{
TextIsEnable(true);
txtGJSXID.Readonly = true;
@ -214,7 +214,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
Grid2Binging();
}
}
else if(gjsx.User_ReceiveID.Contains(this.CurrUser.UserId)) //接收者
else if (!string.IsNullOrEmpty(gjsx.User_ReceiveID) && gjsx.User_ReceiveID.Contains(this.CurrUser.UserId)) //接收者
{
rblIsClosed.Visible = false;
btnSave.Visible = false;
@ -231,7 +231,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
btnSave.Visible = false;
btnsubmit.Visible = false;
}
if (gjsx.User_Acceptance.Contains(this.CurrUser.UserId)) //如果当前登录人为验收人
if (!string.IsNullOrEmpty(gjsx.User_Acceptance) && gjsx.User_Acceptance.Contains(this.CurrUser.UserId)) //如果当前登录人为验收人
{
rblIsClosed.Visible = true;
btnSave.Visible = false;
@ -281,7 +281,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
}
}
if (BLL.GJSXService.GetGJSXById(this.txtGJSXID.Text).State.Trim()=="0")
if (BLL.GJSXService.GetGJSXById(this.txtGJSXID.Text).State.Trim() == "0")
{
Progress_detail.Enabled = false;
nextProgress.Visible = false;
@ -296,7 +296,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
/// <summary>
/// 文本框控件是否启用
/// </summary>
private void TextIsEnable( bool isStart )
private void TextIsEnable(bool isStart)
{
txtGJSXID.Enabled = isStart;
DropUnitId.Enabled = isStart;
@ -314,8 +314,8 @@ namespace FineUIPro.Web.PZHGL.GJSX
private void Grid2Binging()
{
GJSX_detail = BLL.GJSXItemService.GetGJSXDetailByGJSXID(txtGJSXID.Text );
if (rblState.SelectedValue.Trim()=="2")
GJSX_detail = BLL.GJSXItemService.GetGJSXDetailByGJSXID(txtGJSXID.Text);
if (rblState.SelectedValue.Trim() == "2")
{
Model.GJSX_detail detail = new Model.GJSX_detail
{
@ -371,7 +371,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
private void Grid2Save(Grid grid)
{
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid2.GetModifiedDict();
if (modifiedDict!=null)
if (modifiedDict != null)
{
foreach (int rowIndex in modifiedDict.Keys)
{
@ -513,7 +513,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
}
}
if (rblIsClosed.SelectedValue== "true")
if (rblIsClosed.SelectedValue == "true")
{
gjsx.CloseDate = DateTime.Now;
}
@ -532,7 +532,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
}
protected void DropUser_ReceiveID_TextChanged(object sender, EventArgs e)
{
if (DropUser_ReceiveID.SelectedItemArray.Length>1)
if (DropUser_ReceiveID.SelectedItemArray.Length > 1)
{
lblIsManyPeople.Hidden = false;
@ -541,14 +541,14 @@ namespace FineUIPro.Web.PZHGL.GJSX
private bool IsClosed_ManyPeople()
{
bool IsClosed_ManyPeople=true;
List<string > gJSX_Process = BLL.GJSXProcessService.GetProcessListByGJSXID(txtGJSXID.Text);
bool IsClosed_ManyPeople = true;
List<string> gJSX_Process = BLL.GJSXProcessService.GetProcessListByGJSXID(txtGJSXID.Text);
foreach (var item in gJSX_Process)
{
Model.GJSX_detail gJSX_Detail = BLL.GJSXItemService.GetGJSXItemByGJSXID(txtGJSXID.Text,item);
if (gJSX_Detail==null)
Model.GJSX_detail gJSX_Detail = BLL.GJSXItemService.GetGJSXItemByGJSXID(txtGJSXID.Text, item);
if (gJSX_Detail == null)
{
IsClosed_ManyPeople= false;
IsClosed_ManyPeople = false;
}
}
@ -562,7 +562,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
/// <param name="e"></param>
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (rblIsClosed.SelectedValue== "true")
if (rblIsClosed.SelectedValue == "true")
{
save("0");
}
@ -585,8 +585,8 @@ namespace FineUIPro.Web.PZHGL.GJSX
Model.GJSX_Process gJSX_Process = new Model.GJSX_Process()
{
ProcessID = Guid.NewGuid().ToString(),
GJSXID= txtGJSXID.Text,
UserId =item
GJSXID = txtGJSXID.Text,
UserId = item
};
BLL.GJSXProcessService.AddProcess(gJSX_Process); //后添加
}
@ -594,7 +594,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
}
}
if (Table !=null)
if (Table != null)
{
Grid2.GetModifiedDict();
Grid2Save(Grid2);