提交代码
This commit is contained in:
@@ -110,19 +110,38 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.DrawingService.InitDrawingChangeDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
//BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
|
||||
if (!string.IsNullOrEmpty(Request.Params["DrawingNo"]))
|
||||
BLL.DrawingService.InitWorkSectionDropDownList(drpWorkSection, this.CurrUser.LoginProjectId, true);
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(drpMajor, true);
|
||||
BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
|
||||
Funs.FineUIPleaseSelect(this.drpDrawingNo);
|
||||
Funs.FineUIPleaseSelect(this.drpPart);
|
||||
Funs.FineUIPleaseSelect(this.drpProjectContent);
|
||||
if (!string.IsNullOrEmpty(Request.Params["WorkSection"]))
|
||||
{
|
||||
this.drpDrawingNo.SelectedValue = Request.Params["DrawingNo"];
|
||||
this.drpWorkSection.SelectedValue = Request.Params["WorkSection"];
|
||||
BLL.DrawingService.InitDrawingChangeDropDownList2(drpDrawingNo, this.CurrUser.LoginProjectId, Request.Params["WorkSection"], true);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["DrawingId"]))
|
||||
{
|
||||
this.drpDrawingNo.SelectedValue = Request.Params["DrawingId"];
|
||||
BLL.BaseService.InitPartDropDownList(this.drpPart, Request.Params["DrawingId"], true);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["Major"]))
|
||||
{
|
||||
this.drpMajor.SelectedValue = Request.Params["Major"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["Part"]))
|
||||
{
|
||||
this.txtPart.Text = Request.Params["Part"];
|
||||
this.drpPart.SelectedValue = Request.Params["Part"];
|
||||
BLL.BaseService.InitProjectContentDropDownList(this.drpProjectContent, this.drpDrawingNo.SelectedValue, this.drpPart.SelectedValue, true);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["ProjectContent"]))
|
||||
{
|
||||
this.txtProjectContent.Text = Request.Params["ProjectContent"];
|
||||
this.drpProjectContent.SelectedValue = Request.Params["ProjectContent"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["WorkTeam"]))
|
||||
{
|
||||
this.drpWorkTeam.SelectedValue = Request.Params["WorkTeam"];
|
||||
}
|
||||
ProjectService.InitAllProjectDropDownList(this.drpProject, false);
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
@@ -149,20 +168,35 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
|
||||
if (this.drpWorkSection.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND WorkSection = @WorkSection";
|
||||
listStr.Add(new SqlParameter("@WorkSection", this.drpWorkSection.SelectedItem.Text));
|
||||
}
|
||||
if (this.drpDrawingNo.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND DrawingNo = @DrawingNo";
|
||||
listStr.Add(new SqlParameter("@DrawingNo", this.drpDrawingNo.SelectedItem.Text));
|
||||
strSql += " AND DrawingId = @DrawingId";
|
||||
listStr.Add(new SqlParameter("@DrawingId", this.drpDrawingNo.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPart.Text.Trim()))
|
||||
if (this.drpMajor.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Part like @Part";
|
||||
listStr.Add(new SqlParameter("@Part", "%" + this.txtPart.Text.Trim() + "%"));
|
||||
strSql += " AND Major = @Major";
|
||||
listStr.Add(new SqlParameter("@Major", this.drpMajor.SelectedItem.Text));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtProjectContent.Text.Trim()))
|
||||
if (this.drpPart.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND ProjectContent like @ProjectContent";
|
||||
listStr.Add(new SqlParameter("@ProjectContent", "%" + this.txtProjectContent.Text.Trim() + "%"));
|
||||
strSql += " AND Part = @Part";
|
||||
listStr.Add(new SqlParameter("@Part", this.drpPart.SelectedItem.Text));
|
||||
}
|
||||
if (this.drpProjectContent.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND ProjectContent = @ProjectContent";
|
||||
listStr.Add(new SqlParameter("@ProjectContent", this.drpProjectContent.SelectedItem.Text));
|
||||
}
|
||||
if (this.drpWorkTeam.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND WorkTeam = @WorkTeam";
|
||||
listStr.Add(new SqlParameter("@WorkTeam", this.drpWorkTeam.SelectedItem.Text));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -339,8 +373,9 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
string url = "~/CQMS/QuantityManagement/DayInputStatistics.aspx?Date=" + this.txtMonths.Text.Trim() + "&DrawingId=" + this.drpDrawingNo.SelectedValue
|
||||
+ "&Part=" + this.txtPart.Text.Trim() + "&ProjectContent=" + this.txtProjectContent.Text.Trim() + "&ProjectId=" + this.drpProject.SelectedValue;
|
||||
string url = "~/CQMS/QuantityManagement/DayInputStatistics.aspx?Date=" + this.txtMonths.Text.Trim() + "&WorkSection=" + this.drpWorkSection.SelectedValue
|
||||
+ "&DrawingId=" + this.drpDrawingNo.SelectedValue + "&Major=" + this.drpMajor.SelectedValue + "&Part=" + this.drpPart.SelectedValue
|
||||
+ "&ProjectContent=" + this.drpProjectContent.SelectedValue+ "&WorkTeam=" + this.drpWorkTeam.SelectedValue + "&ProjectId=" + this.drpProject.SelectedValue;
|
||||
PageContext.Redirect(url, "_self");
|
||||
}
|
||||
#endregion
|
||||
@@ -616,38 +651,58 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
protected void drpWorkSection_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(this.drpDrawingNo.SelectedValue);
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(this.drpDrawingNo.SelectedValue);
|
||||
if (drawing != null)
|
||||
if (this.drpWorkSection.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
//this.txtWorkSection.Text = drawing.WorkSection;
|
||||
//this.txtDrawingName.Text = drawing.DrawingName;
|
||||
//BLL.BaseService.InitPartDropDownList(this.drpPart, drawing.DrawingId, true);
|
||||
//this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else if (change != null)
|
||||
{
|
||||
//this.txtWorkSection.Text = change.WorkSection;
|
||||
//this.txtDrawingName.Text = change.ChangeName;
|
||||
//BLL.BaseService.InitPartDropDownList(this.drpPart, change.ChangeId, true);
|
||||
//this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
BLL.DrawingService.InitDrawingChangeDropDownList2(drpDrawingNo, this.CurrUser.LoginProjectId, this.drpWorkSection.SelectedValue, true);
|
||||
this.drpDrawingNo.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
//this.txtWorkSection.Text = string.Empty;
|
||||
//this.txtDrawingName.Text = string.Empty;
|
||||
//this.drpPart.Items.Clear();
|
||||
//Funs.FineUIPleaseSelect(this.drpPart);
|
||||
//this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
drpDrawingNo.Items.Clear();
|
||||
Funs.FineUIPleaseSelect(drpDrawingNo);
|
||||
this.drpDrawingNo.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
drpPart.Items.Clear();
|
||||
Funs.FineUIPleaseSelect(drpPart);
|
||||
this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
drpProjectContent.Items.Clear();
|
||||
Funs.FineUIPleaseSelect(drpProjectContent);
|
||||
this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
|
||||
protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpDrawingNo.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
BLL.BaseService.InitPartDropDownList(this.drpPart, this.drpDrawingNo.SelectedValue, true);
|
||||
this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
drpPart.Items.Clear();
|
||||
Funs.FineUIPleaseSelect(drpPart);
|
||||
this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
drpProjectContent.Items.Clear();
|
||||
Funs.FineUIPleaseSelect(drpProjectContent);
|
||||
this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
|
||||
protected void drpPart_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpPart.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
BLL.BaseService.InitProjectContentDropDownList(this.drpProjectContent, this.drpDrawingNo.SelectedValue, this.drpPart.SelectedValue, true);
|
||||
this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
drpProjectContent.Items.Clear();
|
||||
Funs.FineUIPleaseSelect(drpProjectContent);
|
||||
this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
//this.drpProjectContent.Items.Clear();
|
||||
//Funs.FineUIPleaseSelect(this.drpProjectContent);
|
||||
//this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
//this.txtUnit.Text = string.Empty;
|
||||
//this.txtAmount.Text = string.Empty;
|
||||
//this.drpWorkTeam.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user