Пример #1
0
 public static string CheckEmployeeID(string EmployeeID)
 {
     dal dluser = new dal();
     string returnValue = string.Empty;
     try
     {
         returnValue = dluser.UP_Fetch_EmployeeIDAvailability(EmployeeID);
     }
     catch
     {
         returnValue = "error";
     }
     return returnValue;
 }
Пример #2
0
 public static string CheckUserName(string UserID)
 {
     dal dluser = new dal();
     string returnValue = string.Empty;
     try
     {
         returnValue = dluser.UP_Fetch_UserAvailability(UserID);
     }
     catch
     {
         returnValue = "error";
     }
     return returnValue;
 }
Пример #3
0
        public static string[][] ProjectDBChart(string XType, DateTime MonthYear)
        {
            string strloginEmployeeID = HttpContext.Current.Session["EmployeeID"].ToString();
            string empRole = HttpContext.Current.Session["EmployeeRole"].ToString();

            dal dlchart = new dal();
            DataSet dsChart;
            if (empRole == "Administrator")
                dsChart = dlchart.UP_Fetch_ProjectDBChart(XType, MonthYear, string.Empty);
            else
                dsChart = dlchart.UP_Fetch_ProjectDBChart(XType, MonthYear, strloginEmployeeID);

            DataTable dtChart = dsChart.Tables[0];
            string[][] result = new string[dtChart.Rows.Count][];
            for (int i = 0; i < dtChart.Rows.Count; i++)
            {
                result[i] = new string[2];
                result[i][0] = dtChart.Rows[i]["XType"].ToString();
                result[i][1] = dtChart.Rows[i]["cnt"].ToString();
            }
            return result;
        }
Пример #4
0
 public static string CalculateBaseAmount(DateTime InvoiceDate, string BillingCurrency, string BillingAmount)
 {
     dal dl = new dal();
     DataSet dsResult;
     string returnValue = string.Empty;
     try
     {
         dsResult = dl.UP_Fetch_BaseAmount(InvoiceDate, BillingCurrency, BillingAmount.Replace(",",""));
         if (dsResult.Tables[0].Rows.Count == 1)
         {
             returnValue = dsResult.Tables[0].Rows[0]["Result"].ToString();
         }
         else
         {
             returnValue = "Unable to calculate base amount.";
         }
     }
     catch (Exception ex)
     {
         returnValue = "Unable to calculate base amount.";
     }
     return returnValue;
 }