Exemplo n.º 1
0
        private void GetBasicEmployeeInfo()
        {
            DateTime startDate;
            DateTime endDate;

            Ultis.DatesRange(out startDate, out endDate, month, year);

            string     text  = GenerateEmployeeInfo() + GenerateServiceSession() + GeneratePTCommLevel();
            SqlCommand myCmd = new SqlCommand(text);

            myCmd.Parameters.Add("@nnEmployeeID", nEmployeeID);
            myCmd.Parameters.Add("@dtStartDate", startDate);
            myCmd.Parameters.Add("@dtEndDate", endDate);
            if (strBranchCode.Length != 0)
            {
                myCmd.Parameters.Add("@sstrBranchCode", strBranchCode);
            }
            myDBCommon.SelectDataSet(myCmd, myResultDataSet);
            myResultDataSet.Tables[0].TableName = EMPLOYEEINFO;
            myResultDataSet.Tables[1].TableName = SERVICESESSION;
            myResultDataSet.Tables[2].TableName = PTCOMMLEVEL;

            Ultis.AddColumn(myResultDataSet.Tables[EMPLOYEEINFO], "mCommission", "System.Decimal");
            Ultis.AddColumn(myResultDataSet.Tables[SERVICESESSION], "mCommission", "System.Decimal");
        }
Exemplo n.º 2
0
 public void GetLateness(int nEmployeeID, Month aMonth, int aYear)
 {
     this.nEmployeeID = nEmployeeID;
     Ultis.DatesRange(out startDate, out endDate, aMonth, aYear);
     GetLatenessData();
     GenerateLatenessTable();
     CalculateLateness();
 }
Exemplo n.º 3
0
        public DataTable GetSalesCommission(int nEmployeeID, string strBranchCode, CategoryType myCategory, Month month, int year)
        {
            DateTime startDate, endDate;

            Ultis.DatesRange(out startDate, out endDate, month, year);
            SqlParameter paramStartDate = new SqlParameter("@ddtStartDate", SqlDbType.DateTime);

            paramStartDate.Value = startDate;
            SqlParameter paramEndDate = new SqlParameter("@ddtEndDate", SqlDbType.DateTime);

            paramEndDate.Value = endDate;
            SqlParameter paramEmployeeID = new SqlParameter("@inEmployeeID", SqlDbType.Int);

            paramEmployeeID.Value = nEmployeeID;
            SqlParameter paramCategoryID = new SqlParameter("@inCategoryID", SqlDbType.Int);

            paramCategoryID.Value = (int)myCategory;
            return(SqlHelperUtils.ExecuteDataTableSP("pr_tblReceipt_SelectSalesCommission", paramCategoryID, paramStartDate,
                                                     paramEndDate, paramEmployeeID, new SqlParameter("@sstrBranchCode", strBranchCode)));
        }
Exemplo n.º 4
0
        private void GetNettAmmount()
        {
            DateTime startDate;
            DateTime endDate;

            Ultis.DatesRange(out startDate, out endDate, month, year);

            string     text      = GenerateEmployeeNettAmount() + GenerateBranchNettAmount();
            DataSet    myDataSet = new DataSet();
            SqlCommand myCmd     = new SqlCommand(text);

            myCmd.Parameters.Add("@nnSalespersonID", nEmployeeID);
            myCmd.Parameters.Add("@sstrBranchCode", myResultDataSet.Tables[EMPLOYEEINFO].Rows[0]["strBranchCode"]);
            myCmd.Parameters.Add("@dtStartDate", startDate);
            myCmd.Parameters.Add("@dtEndDate", endDate);
            myDBCommon.SelectDataSet(myCmd, myDataSet);
            myDataSet.Tables[0].TableName = EMPLOYEENETTAMOUNT;
            myDataSet.Tables[1].TableName = BRANCHNETTAMOUNT;
            myResultDataSet.Tables.Add(myDataSet.Tables[EMPLOYEENETTAMOUNT].Copy());
            myResultDataSet.Tables.Add(myDataSet.Tables[BRANCHNETTAMOUNT].Copy());
        }