Exemplo n.º 1
0
        public static CCompany CompanyDetailGetById(int CompanyId)
        {
            try
            {
                CCompany oResult   = new CCompany();
                CShared  oDBShared = new CShared();

                // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET
                DataSet dsCompanyInfo = oDBShared.GetDataSet("TCompanyInfo", "uspCompanyInfoGet " + CompanyId);

                using (DataTable dtCompanyInfo = dsCompanyInfo.Tables["TCompanyInfo"])
                {
                    if (dtCompanyInfo.Rows.Count > 0)
                    {
                        oResult.CompanyID             = Convert.ToInt64(dtCompanyInfo.Rows[0]["CompanyID"].ToString());
                        oResult.Name                  = dtCompanyInfo.Rows[0]["Name"].ToString();
                        oResult.Address               = dtCompanyInfo.Rows[0]["Address"].ToString();
                        oResult.Email                 = dtCompanyInfo.Rows[0]["Email"].ToString();
                        oResult.Mobile                = dtCompanyInfo.Rows[0]["Mobile"].ToString();
                        oResult.LogoImgPath           = oDBShared.ImagePathGet(dtCompanyInfo.Rows[0]["LogoImage"].ToString(), 0, string.Empty);
                        oResult.MasterUsername        = dtCompanyInfo.Rows[0]["Username"].ToString();
                        oResult.MasterPassword        = "******";
                        oResult.Status                = dtCompanyInfo.Rows[0]["Status"].ToString();
                        oResult.LastLogged            = Convert.ToDateTime(dtCompanyInfo.Rows[0]["LastLogged"].ToString());
                        oResult.LoginBeforeLastLogged = Convert.ToDateTime(dtCompanyInfo.Rows[0]["LoginBeforeLastLogged"].ToString());
                    }
                    return(oResult);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static COrnamentsPosition OrnamentsPositionDetailGetById(int OrnamentsPositionID)
        {
            try
            {
                COrnamentsPosition oResult   = new COrnamentsPosition();
                CShared            oDBShared = new CShared();

                // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET
                DataSet dsOrnamentsPositionInfo = oDBShared.GetDataSet("TOrnamentsPositionInfo", "uspOrnamentsPositionInfoGet " + OrnamentsPositionID);

                using (DataTable dtOrnamentsPositionInfo = dsOrnamentsPositionInfo.Tables["TOrnamentsPositionInfo"])
                {
                    if (dtOrnamentsPositionInfo.Rows.Count > 0)
                    {
                        oResult.OrnamentPositionID = Convert.ToInt32(dtOrnamentsPositionInfo.Rows[0]["PositionID"].ToString());
                        oResult.CategoryID         = Convert.ToInt32(dtOrnamentsPositionInfo.Rows[0]["CategoryID"].ToString());
                        oResult.Name        = dtOrnamentsPositionInfo.Rows[0]["Name"].ToString();
                        oResult.Description = dtOrnamentsPositionInfo.Rows[0]["Description"].ToString();
                        oResult.ImgPath     = oDBShared.ImagePathGet(dtOrnamentsPositionInfo.Rows[0]["LogoImage"].ToString(), 0, string.Empty);
                    }
                    return(oResult);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
        public static List <CCategory> CategoryDetailList()
        {
            try
            {
                List <CCategory> oResult   = new List <CCategory>();
                CShared          oDBShared = new CShared();

                // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET
                DataSet dsCategoryInfo = oDBShared.GetDataSet("TCategoryInfo", "uspCategoryInfoGet 0");

                using (DataTable dtCategoryInfo = dsCategoryInfo.Tables["TCategoryInfo"])
                {
                    if (dtCategoryInfo.Rows.Count > 0)
                    {
                        for (int iRow = 0; iRow <= dtCategoryInfo.Rows.Count - 1; iRow++)
                        {
                            // SET THE DATASET INFORMATION TO THE RETURN VALUE
                            oResult.Add(new CCategory()
                            {
                                CategoryID  = Convert.ToInt32(dtCategoryInfo.Rows[iRow]["CategoryID"].ToString()),
                                Name        = dtCategoryInfo.Rows[iRow]["Name"].ToString(),
                                Description = dtCategoryInfo.Rows[iRow]["Description"].ToString(),
                                ImgPath     = oDBShared.ImagePathGet(dtCategoryInfo.Rows[iRow]["LogoImage"].ToString(), 0, string.Empty),
                            });
                        }
                    }
                    return(oResult);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 4
0
        // SAVE ORGANIZATION PROJECT SEARCH
        public static List <CCompany> CompanyDetailList(int AdminUserId)
        {
            try
            {
                List <CCompany> oResult   = new List <CCompany>();
                CShared         oDBShared = new CShared();

                // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET
                DataSet dsCompanyInfo = oDBShared.GetDataSet("TCompanyInfo", "uspCompanyInfoGet " + 0);

                using (DataTable dtCompanyInfo = dsCompanyInfo.Tables["TCompanyInfo"])
                {
                    if (dtCompanyInfo.Rows.Count > 0)
                    {
                        for (int iRow = 0; iRow <= dtCompanyInfo.Rows.Count - 1; iRow++)
                        {
                            // SET THE DATASET INFORMATION TO THE RETURN VALUE
                            oResult.Add(new CCompany()
                            {
                                CompanyID             = Convert.ToInt64(dtCompanyInfo.Rows[iRow]["CompanyID"].ToString()),
                                Name                  = dtCompanyInfo.Rows[iRow]["Name"].ToString(),
                                Address               = dtCompanyInfo.Rows[iRow]["Address"].ToString(),
                                Email                 = dtCompanyInfo.Rows[iRow]["Email"].ToString(),
                                Mobile                = dtCompanyInfo.Rows[iRow]["Mobile"].ToString(),
                                LogoImgPath           = oDBShared.ImagePathGet(dtCompanyInfo.Rows[iRow]["LogoImage"].ToString(), 0, string.Empty),
                                Status                = dtCompanyInfo.Rows[iRow]["Status"].ToString(),
                                LastLogged            = Convert.ToDateTime(dtCompanyInfo.Rows[iRow]["LastLogged"].ToString()),
                                LoginBeforeLastLogged = Convert.ToDateTime(dtCompanyInfo.Rows[iRow]["LoginBeforeLastLogged"].ToString())
                            });
                        }
                    }
                    return(oResult);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }