public void bindDebtorData(CLAS.DebtorDataTable a) { UIHelper.ComboBoxInit("Sex", ucSexCodeMcc, FM); UIHelper.ComboBoxInit("LanguageCode", ucLanguageCodeMcc, FM); UIHelper.ComboBoxInit("AddressType", ucAddressTypeMcc, FM); UIHelper.ComboBoxInit("AddressSource", ucAddressSourceMcc, FM); UIHelper.ComboBoxInit("Province", addressGridEX.DropDowns["ddProvince"], FM); UIHelper.ComboBoxInit("Country", addressGridEX.DropDowns["ddCountry"], FM); UIHelper.ComboBoxInit("AddressType", addressGridEX.DropDowns["ddAddressType"], FM); this.debtorBindingSource.DataSource = a.DataSet; this.debtorBindingSource.DataMember = a.TableName; DataView dvAKA = new DataView(FM.DB.AKA, "ContactID=" + CurrentRow().ContactId.ToString(), "", DataViewRowState.CurrentRows); this.aKABindingSource.DataSource = dvAKA; DataView dvAddr = new DataView(FM.DB.Address, "ContactID=" + CurrentRow().ContactId.ToString(), "", DataViewRowState.CurrentRows); this.addressBindingSource.DataSource = dvAddr; ucAddress1.FM = FM; ucAddress1.DataSource = addressBindingSource; FM.DB.Address.ColumnChanged += new DataColumnChangeEventHandler(Address_ColumnChanged); a.ColumnChanged += new DataColumnChangeEventHandler(Address_ColumnChanged); FM.GetCLASMng().GetDebtor().OnUpdate += new atLogic.UpdateEventHandler(ucOpponent_OnUpdate); FM.GetAddress().OnUpdate += new atLogic.UpdateEventHandler(ucOpponent_OnUpdate); SelectCurrentAddress(); ValidateLastKnownAddress(CurrentRow()); }
internal DebtorBE(CLASManager pBEMng) : base(pBEMng, pBEMng.DB.Debtor) { myA = pBEMng; myDebtorDT = (CLAS.DebtorDataTable)myDT; if (!myA.AtMng.AppMan.UseService && myODAL == null) { myODAL = myA.AtMng.DALMngr.GetDebtor(); } this.myDebtorDT.SINColumn.ExtendedProperties.Add("format", "### ### ###"); }
public CLAS.DebtorDataTable LoadByDebtorId(int DebtorId) { this.sqlDa.SelectCommand = sqlSelect; this.sqlSelect.Parameters.Clear(); this.sqlSelect.CommandText = "[DebtorSelectByDebtorId]"; this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DebtorId", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters["@DebtorId"].Value = DebtorId; CLAS.DebtorDataTable dt = new CLAS.DebtorDataTable(); Fill(dt); return(dt); }