protected void ctlTANoLookup_ObjectLookupReturn(object sender, ObjectLookUpReturnArgs e) { TADocumentObj ta = (TADocumentObj)e.ObjectReturn; ctlTANoDetail.Text = ta.DocumentNo; ctlTANoDetail.CommandArgument = ta.TADocumentID.ToString(); }
protected void ctlImgSelect_Click(object sender, ImageClickEventArgs e) { if (IsMultiSelect) { IList <TADocumentObj> taDocumentList = new List <TADocumentObj>(); foreach (GridViewRow row in ctlGridTADocument.Rows) { if ((row.RowType == DataControlRowType.DataRow) && ((CheckBox)row.FindControl("ctlSelect")).Checked) { short documentId = UIHelper.ParseShort(ctlGridTADocument.DataKeys[row.RowIndex].Value.ToString()); Label ctlLblDocumentNoInGrid = ctlGridTADocument.Rows[row.RowIndex].FindControl("ctlLblDocumentNo") as Label; Label ctlLblCreatorInGrid = ctlGridTADocument.Rows[row.RowIndex].FindControl("ctlLblCreator") as Label; Label ctlLblCreateDateInGrid = ctlGridTADocument.Rows[row.RowIndex].FindControl("ctlLblCreateDate") as Label; TADocumentObj taDocument = new TADocumentObj(); taDocument.DocumentNo = ctlLblDocumentNoInGrid.Text; taDocument.Creator = ctlLblCreatorInGrid.Text; taDocument.CreateDate = ctlLblCreateDateInGrid.Text; taDocumentList.Add(taDocument); } } CallOnObjectLookUpReturn(taDocumentList); Hide(); } }
public void LoadData() { List <TADocumentObj> taDocumentList = new List <TADocumentObj>(); #region Set List TADocumentObj tmp1 = new TADocumentObj(); tmp1.DocumentNo = "1"; tmp1.Creator = "admin"; tmp1.CreateDate = "02/10/2009"; taDocumentList.Add(tmp1); TADocumentObj tmp2 = new TADocumentObj(); tmp2.DocumentNo = "2"; tmp2.Creator = "admin"; tmp2.CreateDate = "02/10/2009"; taDocumentList.Add(tmp2); TADocumentObj tmp3 = new TADocumentObj(); tmp3.DocumentNo = "3"; tmp3.Creator = "admin"; tmp3.CreateDate = "02/10/2009"; taDocumentList.Add(tmp3); #endregion Set List ctlGridTADocument.DataSource = taDocumentList; ctlGridTADocument.DataBind(); }
protected void ctlTANoLookup_OnNotifyPopup(object sender, PopUpReturnArgs args) { if (args.Type.Equals(PopUpReturnType.OK)) { TADocumentObj ta = (TADocumentObj)args.Data; ctlTANoDetail.Text = ta.DocumentNo; ctlTAID.Text = ta.DocumentID.ToString(); } ctlUpdatePanelTa.Update(); }
protected void TA_OnObjectLookUpReturn(object sender, ObjectLookUpReturnArgs e) { ctlAddAdvance.Enabled = false; TADocumentObj TA = (TADocumentObj)e.ObjectReturn; ctlAdvanceGridView.Columns[5].Visible = false; // For query only advance that // 1. Status = OutStanding // 2. Do not used in Expense that has flag <> 'Cancel' SCG.eAccounting.DTO.ValueObject.Advance avCriteria = new SCG.eAccounting.DTO.ValueObject.Advance(); avCriteria.CompanyID = CompanyID; avCriteria.RequesterID = RequesterID; avCriteria.AdvanceType = FnExpenseDocumentService.GetExpenseType(this.ExpDocumentID, this.TransactionId); avCriteria.TADocumentID = TA.TADocumentID; FnExpenseDocumentService.SetTA(this.TransactionId, this.ExpDocumentID, avCriteria); if (TA.TADocumentID.HasValue) { ctlTANoLabel.Visible = false; ctlTALinkButton.Text = TA.DocumentNo; ctlTALinkButton.OnClientClick = "window.open('../Programs/DocumentView.aspx?wfid=" + TA.WorkflowID.ToString() + "')"; ctlBusinessChk.Checked = TA.IsBusinessPurpose == null ? false : bool.Parse(TA.IsBusinessPurpose.ToString()); ctlTrainingChk.Checked = TA.IsTrainningPurpose == null ? false : bool.Parse(TA.IsTrainningPurpose.ToString()); ctlOtherChk.Checked = TA.IsOtherPurpose == null ? false : bool.Parse(TA.IsOtherPurpose.ToString()); ctlOther.Text = TA.OtherPurposeDescription.ToString(); ctlFromDateCal.DateValue = UIHelper.ToDateString(TA.FromDate); ctlToDateCal.DateValue = UIHelper.ToDateString(TA.ToDate); ctlCountry.Text = TA.Country; } else { ResetTADataZone(); } this.BindAdvanceGridView(); this.BindRemittanceGridview(); ExpenseDocumentEditor.NotifyPaymentDetailChange(); ctlUpdatePanelExpenseGeneral.Update(); }
protected void ctlGridTADocument_RowCommand(object sender, GridViewCommandEventArgs e) { if (!IsMultiSelect) { if (e.CommandName.Equals("Select")) { int rowIndex = ((GridViewRow)((ImageButton)e.CommandSource).NamingContainer).RowIndex; short documentId = UIHelper.ParseShort(ctlGridTADocument.DataKeys[rowIndex].Value.ToString()); Label ctlLblDocumentNoInGrid = ctlGridTADocument.Rows[rowIndex].FindControl("ctlLblDocumentNo") as Label; Label ctlLblCreatorInGrid = ctlGridTADocument.Rows[rowIndex].FindControl("ctlLblCreator") as Label; Label ctlLblCreateDateInGrid = ctlGridTADocument.Rows[rowIndex].FindControl("ctlLblCreateDate") as Label; TADocumentObj taDocument = new TADocumentObj(); taDocument.DocumentNo = ctlLblDocumentNoInGrid.Text; taDocument.Creator = ctlLblCreatorInGrid.Text; taDocument.CreateDate = ctlLblCreateDateInGrid.Text; CallOnObjectLookUpReturn(taDocument); Hide(); } } }