protected void grdvClaimInfo_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { var info = e.Row.DataItem as HozestERP.BusinessLogic.ManageProject.XMClaimInfo; ImageCheckBox imageIsComfirm = e.Row.FindControl("chkManagerIsAudit") as ImageCheckBox; ImageButton imgClaimDetail = e.Row.FindControl("imgClaimDetail") as ImageButton; if (imgClaimDetail != null) { imgClaimDetail.OnClientClick = "return ShowWindowDetail('查看理赔单','" + CommonHelper.GetStoreLocation() + "ManageProject/XMClaimInfoAdd.aspx?Type=2" + "&&ClaimInfoID=" + info.Id + "',1200,500, this,null);"; } bool isConfirm = true; var claimDetai = base.XMClaimInfoDetailService.GetXMClaimInfoDetailListByClaimInfoID(info.Id); if (claimDetai != null && claimDetai.Count > 0) { foreach (XMClaimInfoDetail q in claimDetai) { if (!q.IsConfirm.Value) { isConfirm = false; } } } imageIsComfirm.Checked = isConfirm; } }
protected void grdvClients_RowCreated(object sender, GridViewRowEventArgs e) { //判断创建的行是否为表头行 if (e.Row.RowType == DataControlRowType.Header) { if (!getIsAuditByDepartmentID()) { //ImageButton imgBtnEditOne = e.Row.FindControl("imgBtnEditOne") as ImageButton; for (int i = 1; i <= 12; i++) { ImageCheckBox ck = e.Row.FindControl("FinancialStatus" + i.ToString()) as ImageCheckBox; ck.Visible = false; ImageButton imgBtnEdit = e.Row.FindControl("imgBtnEdit_" + i.ToString()) as ImageButton; if (imgBtnEdit != null) { imgBtnEdit.OnClientClick = "return ShowWindowDetail('" + i.ToString() + "月份预算数据修改','" + CommonHelper.GetStoreLocation() + "ManageProject/XMprojectCostDetailAdd.aspx?month=" + i.ToString() + "&&year=" + ddlYear.SelectedValue + "&&DepartmentID=" + this.DepartmentID + "&Type=1',550, 600, this, function(){document.getElementById('" + this.btnRefresh.ClientID + "').click();});"; } } } else { for (int i = 1; i <= 12; i++) { ImageCheckBox ck = e.Row.FindControl("FinancialStatus" + i.ToString()) as ImageCheckBox; ck.Visible = true; ImageButton imgBtnEdit = e.Row.FindControl("imgBtnEdit_" + i.ToString()) as ImageButton; imgBtnEdit.Visible = false; } } } }
protected void grdvClaimInfo_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { var info = e.Row.DataItem as HozestERP.BusinessLogic.ManageProject.XMClaimInfo; ImageCheckBox imageIsComfirm = e.Row.FindControl("chkManagerIsAudit") as ImageCheckBox; ImageButton imgClaimDetail = e.Row.FindControl("imgClaimDetail") as ImageButton; ImageButton imgBtnEdit = e.Row.FindControl("imgBtnEdit") as ImageButton; ImageButton imgBtnDelete = e.Row.FindControl("imgBtnDelete") as ImageButton; if (imgBtnEdit != null) { imgBtnEdit.OnClientClick = "return ShowWindowDetail('编辑理赔单','" + CommonHelper.GetStoreLocation() + "ManageProject/XMClaimInfoAdd.aspx?Type=1" + "&&ClaimInfoID=" + info.Id + "',1200,500, this,function(){document.getElementById('" + this.btnSearch.ClientID + "').click();});"; } if (imgClaimDetail != null) { imgClaimDetail.OnClientClick = "return ShowWindowDetail('查看理赔单','" + CommonHelper.GetStoreLocation() + "ManageProject/XMClaimInfoAdd.aspx?Type=2" + "&&ClaimInfoID=" + info.Id + "',1200,500, this,function(){document.getElementById('" + this.btnSearch.ClientID + "').click();});"; } //根据明细确认 bool isConfirm = true; var claimDetai = base.XMClaimInfoDetailService.GetXMClaimInfoDetailListByClaimInfoID(info.Id); if (claimDetai != null && claimDetai.Count > 0) { foreach (XMClaimInfoDetail q in claimDetai) { if (!q.IsConfirm.Value) { isConfirm = false; } } } imageIsComfirm.Checked = isConfirm; //财务确认后将无法编辑和删除 if (isConfirm) { if (imgBtnEdit != null) { imgBtnEdit.Visible = false; } //if (imgBtnDelete != null) //{ // imgBtnDelete.Visible = false; //} } } }
public EnemiesWidget(List<Enemy> enemies, int width, int nbColumns) { Enemies = enemies; CheckBoxes = new Dictionary<Enemy, ImageCheckBox>(); foreach (var e in enemies) CheckBoxes.Add(e, new ImageCheckBox(new Image(e.Name) { SizeX = 5 } )); FirstCheckBox = CheckBoxes[Enemies[0]]; LastCheckBox = CheckBoxes[Enemies[Enemies.Count - 1]]; Width = width; NbColumns = nbColumns; DistanceBetweenTwoChoices = 20; ClickedCount = 0; HoverEnemy = null; }