Esempio n. 1
0
        public static MediclaimApproval GetMediclaimApprovalByID(int mediclaimApprovalID)
        {
            DataRow TheMediclaimApprovalRow = MediclaimApprovalDataAccess.GetInstance.GetMediclaimApprovalByID(mediclaimApprovalID);

            MediclaimApproval TheMediclaimApproval = DataRowToObject(TheMediclaimApprovalRow);

            return(TheMediclaimApproval);
        }
Esempio n. 2
0
        public static List <MediclaimApproval> GetUnPaidMediClaimApprovalList(bool allOffices = false)
        {
            List <MediclaimApproval> UnPaidMediclaimApprovalList = new List <MediclaimApproval>();
            DataTable MediclaimApplicationTable = MediclaimApprovalDataAccess.GetInstance.GetUnPaidMediClaimApprovalList(allOffices);

            foreach (DataRow dr in MediclaimApplicationTable.Rows)
            {
                MediclaimApproval TheMediclaimApplication = DataRowToObject(dr);

                UnPaidMediclaimApprovalList.Add(TheMediclaimApplication);
            }

            return(UnPaidMediclaimApprovalList);
        }
Esempio n. 3
0
        public static MediclaimApproval DataRowToObject(DataRow dr)
        {
            MediclaimApproval TheMediclaimApproval = new MediclaimApproval();

            TheMediclaimApproval.MediclaimApprovalID        = int.Parse(dr["MediclaimApprovalID"].ToString());
            TheMediclaimApproval.MediclaimApplicationID     = int.Parse(dr["MediclaimApplicationID"].ToString());
            TheMediclaimApproval.MediclaimApplicationNumber = dr["MediclaimApplicationNumber"].ToString();
            TheMediclaimApproval.CustomerID              = int.Parse(dr["CustomerID"].ToString());
            TheMediclaimApproval.CustomerCode            = dr["CustomerCode"].ToString();
            TheMediclaimApproval.CustomerName            = dr["CustomerName"].ToString();
            TheMediclaimApproval.MediclaimApprovalDate   = DateTime.Parse(dr["MediclaimApprovalDate"].ToString()).ToString(MicroConstants.DateFormat);
            TheMediclaimApproval.ApprovedByEmployeeID    = int.Parse(dr["ApprovedByEmployeeID"].ToString());
            TheMediclaimApproval.ApprovedByEmployeeCode  = dr["ApprovedByEmployeeCode"].ToString();
            TheMediclaimApproval.ApprovedByEmployeeName  = dr["ApprovedByEmployeeName"].ToString();
            TheMediclaimApproval.MediclaimApprovalAmount = decimal.Parse(dr["MediclaimApprovalAmount"].ToString());
            TheMediclaimApproval.Remarks = dr["Remarks"].ToString();

            return(TheMediclaimApproval);
        }
Esempio n. 4
0
        public int InsertMediclaimApproval(MediclaimApproval theMediclaimApproval)
        {
            int ReturnValue = 0;

            using (SqlCommand InsertCommand = new SqlCommand())
            {
                InsertCommand.CommandType = CommandType.StoredProcedure;
                InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output;
                InsertCommand.Parameters.Add(GetParameter("@MediclaimApplicationID", SqlDbType.Int, theMediclaimApproval.MediclaimApplicationID));
                InsertCommand.Parameters.Add(GetParameter("@MediclaimApprovalDate", SqlDbType.VarChar, theMediclaimApproval.MediclaimApprovalDate));
                InsertCommand.Parameters.Add(GetParameter("@MediclaimApprovalAmount", SqlDbType.Decimal, theMediclaimApproval.MediclaimApprovalAmount));
                InsertCommand.Parameters.Add(GetParameter("@Remarks", SqlDbType.VarChar, theMediclaimApproval.Remarks));
                InsertCommand.Parameters.Add(GetParameter("@ApprovedByEmployeeID", SqlDbType.Int, theMediclaimApproval.ApprovedByEmployeeID));
                InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID));
                InsertCommand.CommandText = "pCRM_MediclaimApprovals_Insert";

                ExecuteStoredProcedure(InsertCommand);

                ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString());

                return(ReturnValue);
            }
        }
Esempio n. 5
0
 public static int InsertMediclaimApproval(MediclaimApproval theMediclaimApproval)
 {
     return(MediclaimApprovalDataAccess.GetInstance.InsertMediclaimApproval(theMediclaimApproval));
 }
Esempio n. 6
0
 public int InsertMediclaimApproval(MediclaimApproval theMediclaimApproval)
 {
     return(MediclaimApprovalIntegration.InsertMediclaimApproval(theMediclaimApproval));
 }