private void LoadDropDownLists()
        {
            m_Banks       = fnn.CreateCombo();
            m_RecAccounts = fnn.CreateCombo();
            fGrid.Rows["exp_account"].Cells[1].DropDownControl = m_RecAccounts;

            //
            foreach (var k in datam.DATA_BANK_RECONCILIATION_ACCOUNTS.Values)
            {
                m_RecAccounts.Items.Add(new fnn.iGComboItemEX()
                {
                    Value = k.br_acc_name,
                    Tag   = k
                });
            }
            //
            foreach (var k in datam.DATA_BANK_ACCOUNTS.Values)
            {
                m_Banks.Items.Add(new fnn.iGComboItemEX()
                {
                    Value = k.BankAccountFullName,
                    Tag   = k
                });
            }

            fGrid.Rows["bank"].Cells[1].DropDownControl = m_Banks;
        }
        private iGDropDownList CreateCombo()
        {
            iGDropDownList icombo = new iGDropDownList();

            //icombo.SelectedItemChanged += new iGSelectedItemChangedEventHandler(icombo_SelectedItemChanged);
            icombo.MaxVisibleRowCount            = 15;
            icombo.SearchAsType.MatchRule        = iGMatchRule.Contains;
            icombo.SearchAsType.AutoCompleteMode = iGSearchAsTypeMode.Filter;
            icombo.SelItemBackColor = Color.Lavender;
            return(icombo);
        }
        private iGDropDownList CreateCombo()
        {
            iGDropDownList icombo = new iGDropDownList();

            icombo.MaxVisibleRowCount            = 15;
            icombo.SearchAsType.MatchRule        = iGMatchRule.Contains;
            icombo.SearchAsType.AutoCompleteMode = iGSearchAsTypeMode.Filter;
            icombo.SelItemBackColor = Color.Moccasin;
            icombo.SelItemForeColor = Color.DarkBlue;
            return(icombo);
        }
        private void LoadMainGrid()
        {
            fGrid.BeginUpdate();
            clear_grid_data();
            iGRow          _row        = null;
            iGDropDownList icombo      = null;
            int            group_index = 1;
            string         group_name  = "Personal Information";

            _row         = CreateNewRow("Account Alias", "alias", typeof(string), group_index, group_name);
            _row         = CreateNewRow("Account ID", "account_id", typeof(string), group_index, group_name);
            _row.Enabled = iGBool.False;
            _row         = CreateNewRow("Account Status", "account_status", typeof(string), group_index, group_name);
            icombo       = CreateCombo();
            icombo.Items.Add(new fnn.iGComboItemEX()
            {
                Tag   = 1,
                Text  = "Enabled",
                Value = "Enabled"
            });
            icombo.Items.Add(new fnn.iGComboItemEX()
            {
                Tag   = 0,
                Text  = "Disabled",
                Value = "Disabled"
            });
            _row.Cells["desc"].DropDownControl = icombo;
            _row.Cells["desc"].Value           = null;
            _row.Enabled = iGBool.False;
            // is system account
            _row   = CreateNewRow("Is System Account", "is_sys_account", typeof(string), group_index, group_name);
            icombo = CreateCombo();
            icombo.Items.Add(new fnn.iGComboItemEX()
            {
                Tag   = 1,
                Text  = "Yes",
                Value = "Yes"
            });
            icombo.Items.Add(new fnn.iGComboItemEX()
            {
                Tag   = 0,
                Text  = "No",
                Value = "No"
            });
            _row.Cells["desc"].DropDownControl = icombo;
            _row.Cells["desc"].Value           = null;
            _row.Enabled = iGBool.False;
            //
            _row = CreateNewRow("Map ID", "map_id", typeof(int), group_index, group_name);
            fGrid.EndUpdate();
        }
Пример #5
0
        private void backworker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            using (var xd = new xing())
            {
                datam.fill_accounts(xd);
                datam.GetPledgeSettings(xd);
                datam.GetDepartments(xd);
                xd.CommitTransaction();
            }

            m_accounts = fnn.CreateCombo();
            //
            if (datam.DATA_ACCOUNTS != null)
            {
                //List<int> ValidIDS = (from s in datam.DATA_PLEDGE_SETTINGS.Values
                //                      where s.end_fs_id > sdata.CURR_FS.fs_id
                //                      select s.account_id).ToList();
                //if (ValidIDS != null && ValidIDS.Count > 0)
                //{

                //}
                //else
                //{

                //}
                var nlist = accn.GetChildAccounts("OFFERTORY", em.account_typeS.ActualAccount);
                foreach (var k in nlist)
                {
                    m_accounts.Items.Add(new fnn.iGComboItemEX()
                    {
                        Tag   = k,
                        Value = k.account_name
                    });
                }
            }
            LoadMainGrid();
            m_accounts.MaxVisibleRowCount = 8;
            fGrid.Rows["account"].Cells[1].DropDownControl = m_accounts;
            ClearGrid();
            datam.HideWaitForm();
            Application.DoEvents();
            fGrid.Focus();
            fGrid.SetCurCell("pledge_name", 1);
        }
Пример #6
0
        private void LoadLists()
        {
            m_Husbands = fnn.CreateCombo();
            m_Wifes    = fnn.CreateCombo();
            var _husbands = from k in datam.DATA_MEMBER.Values
                            where k.IsCurrentMember & k.gender_id == (em.xgender.Male).ToByte() & (k.objSpouse == null || (k.objSpouse.couple_id == 0 & k.objSpouse.spouse_id == 0))
                            select k;

            //var _husbands = from k in datam.DATA_MEMBER.Values
            //                where k.IsCurrentMember & k.gender_id == (em.xgender.Male).ToByte()
            //                select k;
            foreach (var d in _husbands)
            {
                m_Husbands.Items.Add(new fnn.iGComboItemEX()
                {
                    ID    = d.mem_id,
                    Value = d.mem_name,
                    Tag   = d
                });
            }
            fGrid.Rows["husband"].Cells["desc"].DropDownControl = m_Husbands;
            //
            var _wifes = from k in datam.DATA_MEMBER.Values
                         where k.IsCurrentMember & k.gender_id == (em.xgender.Female).ToByte() & (k.objSpouse == null || (k.objSpouse.couple_id == 0 & k.objSpouse.spouse_id == 0))
                         select k;

            //var _wifes = from k in datam.DATA_MEMBER.Values
            //             where k.IsCurrentMember & k.gender_id == (em.xgender.Female).ToByte()
            //             select k;
            foreach (var d in _wifes)
            {
                m_Wifes.Items.Add(new fnn.iGComboItemEX()
                {
                    ID    = d.mem_id,
                    Value = d.mem_name,
                    Tag   = d
                });
            }
            fGrid.Rows["wife"].Cells["desc"].DropDownControl = m_Wifes;
            fGrid.Focus();
            fGrid.SetCurCell("husband", 1);
        }
Пример #7
0
        private void LoadMainGrid()
        {
            fGrid.BeginUpdate();
            iGRow _row = null;

            _row            = fGrid.Rows.Add();
            _row.Height     = 7;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            iGDropDownList icombo      = null;
            int            group_index = 1;
            string         group_name  = "New Account Information";

            _row = CreateNewRow("Husband's Name", "husband", typeof(string), group_index, group_name);
            _row.Cells[1].TypeFlags = iGCellTypeFlags.HasEllipsisButton;
            _row.Height            += 2;
            _row = CreateNewRow("Wife's Name", "wife", typeof(string), group_index, group_name);
            _row.Cells[1].TypeFlags = iGCellTypeFlags.HasEllipsisButton;
            _row.Height            += 2;
            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 7;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            //
            _row = CreateNewRow("HouseHold Name", "household", typeof(string), group_index, group_name); _row.Height += 2;
            _row.Cells[1].ForeColor = Color.Maroon;
            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 7;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            //
            group_name = "Spouse And Marriage Details";
            CreateNewRow("Year Of Marriage", "marr_yr", typeof(Int32), group_index, group_name);
            _row = CreateNewRow("Date Of Marriage", "marr_date", typeof(Int32), group_index, group_name);
            _row.Cells["desc"].TypeFlags       = iGCellTypeFlags.ComboPreferValue | iGCellTypeFlags.NoTextEdit | iGCellTypeFlags.HasEllipsisButton;
            _row.Cells["desc"].FormatString    = "{0:D}"; // {0:d} for short date string
            _row.Cells["desc"].Value           = null;    // DateTime.Parse("1/1/2010");
            _row.Cells["desc"].DropDownControl = new fnn.DropDownCalendar();
            _row.Cells["desc"].ReadOnly        = iGBool.True;
            _row = CreateNewRow("Church Name", "marr_church", typeof(string), group_index, group_name);
            #region MyRegion
            icombo = fnn.CreateCombo();
            icombo.SearchAsType.MatchRule = iGMatchRule.StartsWith;
            icombo.MaxVisibleRowCount     = 12;
            var clist = from r in xso.xso.DATA_REGION.Values
                        where r.item_type == xso.em.cregion_type.church & r.item_id > 0
                        select r;
            foreach (var f in clist)
            {
                icombo.Items.Add(new fnn.iGComboItemEX()
                {
                    Text  = f.item_name,
                    Value = f.item_name,
                    Tag   = f
                });
            }
            _row.Cells["desc"].DropDownControl = icombo;
            _row.Cells["desc"].Value           = null;
            #endregion

            _row = CreateNewRow("Pastor's Name", "marr_pastor", typeof(string), group_index, group_name);
            fGrid.EndUpdate();
        }
Пример #8
0
        private void LoadMainGrid()
        {
            fGrid.BeginUpdate();
            iGRow _row = null;

            _row            = fGrid.Rows.Add();
            _row.Height     = 7;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            iGDropDownList icombo      = null;
            int            group_index = 1;
            string         group_name  = "Expense Information";

            //
            _row = CreateNewRow("Expense Account Name", "account", typeof(string), group_index, group_name);
            _row.Cells[0].TextAlign = iGContentAlignment.MiddleRight;
            _row.Cells[1].TextAlign = iGContentAlignment.MiddleLeft;
            //

            //item code
            _row = CreateNewRow("+(F1)  Department", "department", typeof(string), group_index, group_name);
            _row.Cells[0].TextAlign = iGContentAlignment.MiddleRight;
            _row.Cells[1].TextAlign = iGContentAlignment.MiddleLeft;
            //
            icombo = fnn.CreateCombo();
            var slist = from k in datam.DATA_DEPARTMENT.Values
                        select k;

            foreach (var c in slist)
            {
                icombo.Items.Add(new fnn.iGComboItemEX()
                {
                    Value = c.dept_name,
                    Text  = c.dept_name,
                    Tag   = c
                });
            }
            icombo.SelItemBackColor            = Color.Bisque;
            _row.Cells["desc"].DropDownControl = icombo;
            _row.Cells["desc"].Value           = null;
            //
            _row = CreateNewRow("Expense Category", "item_cat", typeof(string), group_index, group_name);
            _row.Cells[0].TextAlign = iGContentAlignment.MiddleRight;
            _row.Cells[1].TextAlign = iGContentAlignment.MiddleLeft;
            //
            icombo = fnn.CreateCombo();
            foreach (var c in datam.DATA_EXPENSE_CATEGORY.Values)
            {
                icombo.Items.Add(new fnn.iGComboItemEX()
                {
                    Value = c.exp_cat_name,
                    Text  = c.exp_cat_name,
                    Tag   = c
                });
            }
            icombo.SelItemBackColor            = Color.Bisque;
            _row.Cells["desc"].DropDownControl = icombo;
            _row.Cells["desc"].Value           = null;


            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 5;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            _row            = CreateNewRow("Owner Type", "owner_type", typeof(string), group_index, group_name);
            icombo          = fnn.CreateCombo();


            foreach (var k in m_OWNER_Types.Keys)
            {
                icombo.Items.Add(new fnn.iGComboItemEX()
                {
                    Value = k,
                    Tag   = k
                });
            }
            _row.Cells["desc"].DropDownControl = icombo;
            //
            _row         = CreateNewRow("Owner Name", "owner", typeof(string), group_index, group_name);
            _row.Visible = false;
            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 5;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            //
            fGrid.EndUpdate();
            var nlist = from r in fGrid.Rows.Cast <iGRow>()
                        where !string.IsNullOrEmpty(r.Key)
                        select r;

            foreach (var t in nlist)
            {
                t.AutoHeight();
                t.Height            += 5;
                t.Cells[0].TextAlign = iGContentAlignment.MiddleRight;
                t.Cells[1].TextAlign = iGContentAlignment.MiddleLeft;
            }
            fGrid.SetCurCell(fGrid.Rows["account"].Index, 1);
            fGrid.Select(); fGrid.Focus();
        }
Пример #9
0
 private void LoadDropDownLists()
 {
     m_Deparments    = fnn.CreateCombo();
     m_church_groups = fnn.CreateCombo();
     m_members       = fnn.CreateCombo();
     m_CG_Shared     = fnn.CreateCombo();
     if (datam.DATA_CHURCH_GROUPS != null)
     {
         foreach (var k in datam.DATA_CHURCH_GROUPS.Values)
         {
             m_church_groups.Items.Add(new fnn.iGComboItemEX()
             {
                 ID    = k.cg_id,
                 Value = string.Format("{0} :: {1}", datam.DATA_CG_TYPES[k.cg_type_id].cg_type_name, k.cg_name)
             });
         }
         //
         var dlist = (from l in datam.DATA_CHURCH_GROUPS.Values
                      select l.cg_type_id).Distinct().ToList();
         ic.church_group_typeC _cg_type = null;
         foreach (var k in dlist)
         {
             _cg_type = datam.DATA_CG_TYPES[k];
             m_CG_Shared.Items.Add(new fnn.iGComboItemEX()
             {
                 ID        = _cg_type.cg_type_id,
                 Value     = string.Format("{0} Shared", _cg_type.cg_type_name),
                 ForeColor = Color.DarkBlue
             });
         }
     }
     //
     if (datam.DATA_DEPARTMENT != null)
     {
         var nlist = from k in datam.DATA_DEPARTMENT.Values
                     where k.dept_type == em.dept_typeS.main
                     orderby k.dept_name
                     select k;
         foreach (var k in nlist)
         {
             m_Deparments.Items.Add(new fnn.iGComboItemEX()
             {
                 ID    = k.dept_id,
                 Value = k.dept_name
             });
         }
     }
     //
     if (datam.DATA_MEMBER != null)
     {
         var nlist = from k in datam.DATA_MEMBER.Values
                     where k.IsCurrentMember
                     select k;
         foreach (var k in nlist)
         {
             m_members.Items.Add(new fnn.iGComboItemEX()
             {
                 ID    = k.mem_id,
                 Value = string.Format("{0}-{1}", k.mem_name, k.mem_code)
             });
         }
     }
 }
        private void LoadMainGrid()
        {
            fGrid.BeginUpdate();
            iGRow _row = null;

            _row            = fGrid.Rows.Add();
            _row.Height     = 4;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            int    group_index = 1;
            string group_name  = "New Account Information";
            //
            var _date = new fnn.DropDownCalenderX();

            _date.start_date = new DateTime(2015, 1, 1);
            // _date.start_date = sdata.CURR_DATE;
            _date.end_date      = sdata.CURR_DATE;
            _date.selected_date = sdata.CURR_DATE;
            //
            _row = CreateNewRow("Transfer Date", "transfer_date", typeof(string), group_index, group_name);
            _row.Cells["desc"].TypeFlags       = iGCellTypeFlags.ComboPreferValue | iGCellTypeFlags.NoTextEdit | iGCellTypeFlags.HasEllipsisButton;
            _row.Cells["desc"].FormatString    = "{0:D}";// {0:d} for short date string
            _row.Cells["desc"].DropDownControl = _date;
            _row.Cells["desc"].Value           = null;
            //


            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 4;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            //
            _row = CreateNewRow("From Account", "account_from", typeof(string), group_index, group_name);
            _row.Cells[1].ForeColor             = Color.DarkBlue;
            _row.Cells[0].ForeColor             = Color.Maroon;
            m_SourceAccounts                    = fnn.CreateCombo();
            m_SourceAccounts.MaxVisibleRowCount = 6;
            _row.Cells[1].DropDownControl       = m_SourceAccounts;
            _row.Cells[1].Value                 = null;
            _row.Cells[1].Enabled               = iGBool.False;
            //
            _row = CreateNewRow("Account Balance", "account_balance", typeof(decimal), group_index, group_name);
            _row.Cells[1].Enabled      = iGBool.False;
            _row.Cells[0].ForeColor    = Color.Gray;
            _row.Cells[1].FormatString = "{0:N0}";
            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 4;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            _row.Height    += 2;
            //
            _row = CreateNewRow("To Account", "account_to", typeof(string), group_index, group_name);
            _row.Cells[1].ForeColor = Color.DarkBlue;
            _row.Cells[0].ForeColor = Color.Green;
            m_DestinationAccounts   = fnn.CreateCombo();
            m_DestinationAccounts.MaxVisibleRowCount = 6;
            _row.Cells[1].DropDownControl            = m_DestinationAccounts;
            _row.Cells[1].Value   = null;
            _row.Cells[1].Enabled = iGBool.False;
            //
            _row = CreateNewRow("Transfered Amount", "transfer_amount", typeof(decimal), group_index, group_name);
            _row.Cells[1].Enabled      = iGBool.False;
            _row.Cells[1].FormatString = "{0:N0}";
            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 4;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            _row.Height    += 2;
            //
            _row        = CreateNewRow("Transfer \n Reason", "reason", typeof(string), group_index, group_name);
            _row.Height = 60;
            _row.Cells["desc"].TextFormatFlags = iGStringFormatFlags.WordWrap;
            _row.Cells["name"].TextAlign       = iGContentAlignment.MiddleRight;
            //
            _row            = fGrid.Rows.Add();
            _row.Height     = 3;
            _row.BackColor  = Color.Lavender;
            _row.Selectable = false;
            //


            fGrid.EndUpdate();
        }
        private void LoadMainGrid()
        {
            try
            {
                fGrid.BeginUpdate();
                iGRow          _row   = null;
                iGDropDownList icombo = null;
                #region Personal Information
                int    group_index = 1;
                string group_name  = "Member Information";
                //current year
                _row                     = CreateNewRow(null, null, typeof(string), group_index, group_name);
                _row.Selectable          = false;
                _row.Height              = 5;
                _row.BackColor           = Color.Lavender;
                _row                     = CreateNewRow("Member Name", "mem_name", typeof(string), group_index, group_name);
                _row.ReadOnly            = iGBool.True;
                _row.Cells["desc"].Value = mem_obj != null ? mem_obj.mem_name : string.Empty;
                //
                _row.Cells["desc"].Value = mem_obj != null ? mem_obj.mem_name : string.Empty;
                _row = CreateNewRow("Member Code", "mem_code", typeof(string), group_index, group_name);
                _row.Cells[1].Enabled    = iGBool.False;
                _row.ReadOnly            = iGBool.True;
                _row.Cells["desc"].Value = mem_obj != null ? mem_obj.mem_code : string.Empty;

                //
                if (mem_obj.ChurchGroupCollection != null && mem_obj.ChurchGroupCollection.Count > 0)
                {
                    _row                  = CreateNewRow("Group Name", "fg_group", typeof(string), group_index, group_name);
                    _row.ReadOnly         = iGBool.True;
                    _row.Cells[1].Enabled = iGBool.False;
                    // _row.Cells["desc"].Value = mem_obj != null ? datam.DATA_FELLOWSHIPGROUPS[mem_obj.fg_id].fg_name : string.Empty;
                }
                //
                _row = CreateNewRow("Member Picture", "mem_pic", typeof(object), group_index, group_name);
                _row.Cells["desc"].ReadOnly         = iGBool.True;
                _row.Cells["name"].TypeFlags        = iGCellTypeFlags.NoTextEdit;
                _row.Cells["name"].Selectable       = iGBool.False;
                _row.Cells["name"].TextAlign        = iGContentAlignment.MiddleRight;
                _row.Cells["desc"].CustomDrawFlags |= iGCustomDrawFlags.Foreground;
                if (mem_obj != null && mem_obj.objPicture != null)
                {
                    var _img = fn.IMAGERESIZER(mem_obj.objPicture.SmallPicture, (mem_obj.objPicture.SmallPicture.Width * .75).ToFloat(), (mem_obj.objPicture.SmallPicture.Height * .75).ToFloat());
                    _row.Cells["desc"].Value     = _img;
                    fGrid.Rows["mem_pic"].Height = 90;
                }

                //
                _row            = CreateNewRow(null, null, typeof(string), group_index, group_name);
                _row.Selectable = false;
                _row.Height     = 5;
                _row.BackColor  = Color.Lavender;
                _row            = CreateNewRow("* Transfer Date", "transfer_date", typeof(Int32), group_index, group_name);
                _row.Cells["desc"].TypeFlags       = iGCellTypeFlags.ComboPreferValue | iGCellTypeFlags.NoTextEdit | iGCellTypeFlags.HasEllipsisButton;
                _row.Cells["desc"].FormatString    = "{0:D}"; // {0:d} for short date string
                _row.Cells["desc"].Value           = null;    // DateTime.Parse("1/1/2010");
                _row.Cells["desc"].DropDownControl = new fnn.DropDownCalendar();
                _row.Cells["name"].ForeColor       = Color.Green;
                //
                _row = CreateNewRow("New Church Name", "church", typeof(string), group_index, group_name);
                var ch_list = from n in xso.xso.DATA_REGION.Values
                              where (n.item_type == xso.em.cregion_type.church |
                                     n.item_type == xso.em.cregion_type.church_company |
                                     n.item_type == xso.em.cregion_type.sabbath_school)
                              select n;
                icombo = CreateCombo();
                icombo.SelItemBackColor       = Color.Lavender;
                icombo.SearchAsType.MatchRule = iGMatchRule.StartsWith;
                icombo.MaxVisibleRowCount     = 7;
                foreach (var f in ch_list)
                {
                    icombo.Items.Add(new fnn.iGComboItemEX()
                    {
                        Text  = f.item_name,
                        Value = f.item_name,
                        Tag   = f
                    });
                }
                _row.Cells["desc"].DropDownControl = icombo;
                _row.Cells["desc"].Value           = null;
                //
                _row        = CreateNewRow("Reason", "reason", typeof(string), group_index, group_name);
                _row.Height = 60;
                _row.Cells["desc"].TextFormatFlags = iGStringFormatFlags.WordWrap;
                _row.Cells["name"].TextAlign       = iGContentAlignment.MiddleCenter;
                //
                _row        = CreateNewRow("Comment", "comment", typeof(string), group_index, group_name);
                _row.Height = 60;
                _row.Cells["desc"].TextFormatFlags = iGStringFormatFlags.WordWrap;
                _row.Cells["name"].TextAlign       = iGContentAlignment.MiddleCenter;

                #endregion
                fGrid.EndUpdate();
            }
            catch (Exception ed)
            {
                MessageBox.Show(ed.Message);
            }
        }