Exemple #1
0
        private void ClientInfo_Load(object sender, EventArgs e)
        {
            string sql = @" select cp.*, ccd.FirstCheckDate from ClientPayroll cp left join ClientCheckDate ccd on cp.AccNum=ccd.AccNum ";

            dt_clients = DBOperator.QuerySql(sql);
            //ClientPayrolls = DBOperator.getListFromTable<Model.ClientPayroll>(dt);
            var acclist = from ac in dt_clients.AsEnumerable()
                          select ac[0].ToString();

            AccNumList.DataSource = acclist.ToArray();

            var enList = from ac in dt_clients.AsEnumerable()
                         select ac[5].ToString();

            comboBox2.DataSource = enList.ToArray();
            this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);

            editControls(true);
            if (Main.cUser.UserLevel >= 10)
            {
                tAccRep.Enabled = false;
                tPayRep.Enabled = false;
                tCkRep.Enabled  = false;
            }
            else
            {
                dFirstCheckDate.Enabled = false;
                tAccRep.Enabled         = false;
                tPayRep.Enabled         = false;
                tCkRep.Enabled          = false;
            }
            dFirstCheckDate.Enabled = true;
        }
Exemple #2
0
        private ClientPayroll()
        {
            InitializeComponent();

            editControls(false);
            AutoScroll = true;
            DBOperator.SetComboxRepData(tAccRep);
            DBOperator.SetComboxRepDataFirstName(tPayRep);
            DBOperator.SetComboxRepDataFirstName(tCkRep);
        }
Exemple #3
0
        private void dFirstCheckDate_ValueChanged(object sender, EventArgs e)
        {
            string accNum = tAccNum.Text;
            string sql    = "delete ClientCheckDate where AccNum='" + accNum + @"'; 
                         insert into ClientCheckDate values('" + accNum + "','" + dFirstCheckDate.Text + "');";

            DBOperator.ExecuteSql(sql);

            sql        = " select cp.*, ccd.FirstCheckDate from ClientPayroll cp left join ClientCheckDate ccd on cp.AccNum = ccd.AccNum ";
            dt_clients = DBOperator.QuerySql(sql);
        }
Exemple #4
0
        public static void SetComboxRepDataFirstName(ComboBox comb)
        {
            string    sql = "select Rep, FirstName as 'Name' from Representative order by FirstName, LastName";
            DataTable dt  = DBOperator.QuerySql(sql);
            DataRow   dr  = dt.NewRow();

            dr["Rep"]  = "All";
            dr["Name"] = "All";
            dt.Rows.InsertAt(dr, 0);
            comb.DataSource    = dt;
            comb.ValueMember   = "Rep";
            comb.DisplayMember = "Name";
        }
Exemple #5
0
        private void saveCurentItem()
        {
            string sql = "update ClientPayroll set EIN='" + tEIN.Text.Replace("'", "''") + "', AccRep='" + tAccRep.Text + "', PayRep='" + tPayRep.Text + "', CkRep='" + tCkRep.Text + "', Entity='" + tEntity.Text.Replace("'", "''") + "', TradeName='" + tTradeName.Text.Replace("'", "''") + "', BusAdd1='" + tBusAdd1.Text + "', BusAdd2='" + tBusAdd2.Text + "', BusCity='" + tBusCity.Text + "', BusSt='" + tBusSt.Text + "', BusZip='" + tBusZip.Text + @"', 
                                MailAdd1 = '" + tMailAdd1.Text + "', MailAdd2 = '" + tMailAdd2.Text + "', MailCity = '" + tMailCity.Text + "', MailSt = '" + tMailSt.Text + "', MailZip = '" + tMailZip.Text + "', HomeAdd = '" + tHomeAdd.Text + "', Contact1 = '" + tContact1.Text + "', Contact1Tel1 = '" + tContact1Tel1.Text + "', Contact1Tel2 = '" + tContact1Tel2.Text + "', Contact2 = '" + tContact2.Text + "', Contact2Tel1 = '" + tContact2Tel1.Text + @"', 
                                Contact2Tel2 = '" + tContact2Tel2.Text + "', Fax = '" + tFax.Text + "', Email = '" + tEmail.Text + "', Lauguage = '" + tLanguage.Text + "', PayStartDate = '" + tpayStartDate.Text + "', PayType = '" + cPayType.Text + "', PayFreq = '" + cPayFreq.Text + "', TaxDepType = '" + cTaxDepType.Text + "', Bank = '" + tBank.Text + "', BankRtg = '" + tBankRtg.Text + "', BankAcc = '" + tBankAcc.Text + "', BankStartDate = '" + tbankStartDate.Text + @"',
                                DateIn = '" + cDateIn.Text + "', DateOut = '" + cDateOut.Text + "', TimeToDone = '" + tTimeToDone.Text + "', AveNumEE = '" + tAveNumEE.Text + "', PayClosedDate = '" + tpayCloseDate.Text + "', Note = '" + tNote.Text.Replace("'", "''") + "', FedTaxFreq = '" + cFedTaxFreq.Text + "', EFTPS = '" + tEFTPS.Text + "', F8655 = '" + cF8655.Text + "', EFTPSPin = '" + tEFTPSPin.Text + "', EFTPSPw = '" + tEFTPSPw.Text + "', PhilaNum = '" + tPhilaNum.Text + @"',
                                PhilaTaxFreq = '" + cPhilaTaxFreq.Text + "', PhilaPayType = '" + cPhilaPayType.Text + "', PhilaEZReportNum = '" + tPhilaEZReportN.Text + "', PhilaEZPw = '" + tPhilaEZPw.Text + "', PhilaOnlinePin = '" + tPhilaOnlinePin.Text + "', Local = '" + tLocal.Text + "', LocalPSD = '" + tLocalPSD.Text + "', LocalCollector = '" + tLocalCollector.Text + "', LocalTaxFreq = '" + tLocalTaxFreq.Text + @"',
                                LocalPayType = '" + cLocalPayType.Text + "', LocalUser = '******', LocalPw = '" + tLocalPw.Text + "', LST = '" + tLST.Text + "', LSTCollector = '" + tLSTCollector.Text + "', LSTTaxFreq = '" + tLSTTaxFreq.Text + "', LSTPayType = '" + cLSTPayType.Text + "', LSTUser = '******', LSTPw = '" + tLSTPW.Text + "', UC = '" + tUC.Text + "', UCNum = '" + tUCNum.Text + "', UCPayType = '" + cUCPayType.Text + @"',
                                UCUsername = '******', UCPassword = '******', UCContaceEM = '" + tUCContactEm.Text + "', PAUCQ1 = '" + tPAUCQ1.Text.Replace("'", "''") + "', PAUCQ2 = '" + tPAUCQ2.Text.Replace("'", "''") + "', PAUCQ3 = '" + tPAUCQ3.Text.Replace("'", "''") + "', State = '" + tState.Text + @"',
                                StateTaxFreq = '" + cStateTaxFreq.Text + "', StateWH = '" + tStateWH.Text + "', StateUser = '******', StatePw = '" + tStatePw.Text + @"'
                        where AccNum = '" + tAccNum.Text + "'";

            DBOperator.ExecuteSql(sql);
            sql        = " select cp.*, ccd.FirstCheckDate from ClientPayroll cp left join ClientCheckDate ccd on cp.AccNum = ccd.AccNum ";
            dt_clients = DBOperator.QuerySql(sql);
        }
Exemple #6
0
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            string entity = comboBox2.Text;
            var    row    = (from ac in dt_clients.AsEnumerable()
                             where ac[5].ToString() == entity
                             select ac).First();
            var acc = DBOperator.getObjectFromRow <Model.ClientPayroll>(row);

            AccNumList.Text      = acc.AccNum;
            tAccNum.Text         = acc.AccNum;
            tEIN.Text            = acc.EIN;
            tEntity.Text         = acc.Entity;
            tTradeName.Text      = acc.TradeName;
            tPayRep.Text         = acc.PayRep;
            tCkRep.Text          = acc.CkRep;
            tAccRep.Text         = acc.AccRep;
            tBusAdd1.Text        = acc.BusAdd1;
            tBusAdd2.Text        = acc.BusAdd2;
            tBusCity.Text        = acc.BusCity;
            tBusSt.Text          = acc.BusSt;
            tBusZip.Text         = acc.BusZip;
            tMailAdd1.Text       = acc.MailAdd1;
            tMailAdd2.Text       = acc.MailAdd2;
            tMailCity.Text       = acc.MailCity;
            tMailSt.Text         = acc.MailSt;
            tMailZip.Text        = acc.MailZip;
            tHomeAdd.Text        = acc.HomeAdd;
            tFax.Text            = acc.Fax;
            tEmail.Text          = acc.Email;
            tLanguage.Text       = acc.Lauguage;
            tContact1.Text       = acc.Contact1;
            tContact1Tel1.Text   = acc.Contact1Tel1;
            tContact1Tel2.Text   = acc.Contact1Tel2;
            tContact2.Text       = acc.Contact2;
            tContact2Tel1.Text   = acc.Contact2Tel1;
            tContact2Tel2.Text   = acc.Contact2Tel2;
            cPayType.Text        = acc.PayType;
            cPayFreq.Text        = acc.PayFreq;
            cTaxDepType.Text     = acc.TaxDepType;
            tpayStartDate.Text   = acc.PayStartDate;
            tpayCloseDate.Text   = acc.PayClosedDate;
            tBank.Text           = acc.Bank;
            tBankRtg.Text        = acc.BankRtg;
            tBankAcc.Text        = acc.BankAcc;
            tbankStartDate.Text  = acc.BankStartDate;
            cDateIn.Text         = acc.DateIn;
            cDateOut.Text        = acc.DateOut;
            tTimeToDone.Text     = acc.TimeToDone;
            tAveNumEE.Text       = acc.AveNumEE;
            tNote.Text           = acc.Note;
            cFedTaxFreq.Text     = acc.FedTaxFreq;
            tEFTPS.Text          = acc.EFTPS;
            cF8655.Text          = acc.F8655;
            tEFTPSPin.Text       = acc.EFTPSPin;
            tEFTPSPw.Text        = acc.EFTPSPw;
            tState.Text          = acc.State;
            cStateTaxFreq.Text   = acc.StateTaxFreq;
            tStateWH.Text        = acc.StateWH;
            tStateUser.Text      = acc.StateUser;
            tStatePw.Text        = acc.StatePw;
            tPhilaNum.Text       = acc.PhilaNum;
            cPhilaTaxFreq.Text   = acc.PhilaTaxFreq;
            cPhilaPayType.Text   = acc.PhilaPayType;
            tPhilaEZReportN.Text = acc.PhilaEZReportNum;
            tPhilaEZPw.Text      = acc.PhilaEZPw;
            tPhilaOnlinePin.Text = acc.PhilaOnlinePin;
            tLocal.Text          = acc.Local;
            tLocalPSD.Text       = acc.LocalPSD;
            tLocalCollector.Text = acc.LocalCollector;
            tLocalTaxFreq.Text   = acc.LocalTaxFreq;
            cLocalPayType.Text   = acc.LocalPayType;
            tLocalUser.Text      = acc.LocalUser;
            tLocalPw.Text        = acc.LocalPw;
            tLST.Text            = acc.LST;
            tLSTCollector.Text   = acc.LSTCollector;
            tLSTTaxFreq.Text     = acc.LSTTaxFreq;
            cLSTPayType.Text     = acc.LSTPayType;
            tLSTUser.Text        = acc.LSTUser;
            tLSTPW.Text          = acc.LSTPW;
            tUC.Text             = acc.UC;
            tUCNum.Text          = acc.UCNum;
            cUCPayType.Text      = acc.UCPayType;
            cUCUsername.Text     = acc.UCUsername;
            tUCPassword.Text     = acc.UCPassword;
            tUCContactEm.Text    = acc.UCContaceEM;
            tPAUCQ1.Text         = acc.PAUCQ1;
            tPAUCQ2.Text         = acc.PAUCQ2;
            tPAUCQ3.Text         = acc.PAUCQ3;
            dFirstCheckDate.Text = acc.FirstCheckDate.Trim() == ""?null: acc.FirstCheckDate.Trim();
        }