Пример #1
0
        public static string User_Validation(int user, string pwd, int company, int office)
        {
            string sResponse = string.Empty;

            try
            {
                sResponse = ControlsBLL.gfUserCheckExist(user, pwd, company, office).Rows[0][0].ToString();
                string[] asResponse = sResponse.Split('|');
                if (asResponse[0] == "1")
                {
                    sResponse = ICompanyController.gfCompaniaPathImg(company, asResponse[1]);
                    HttpContext.Current.Session["sImgEmpresa"] = sResponse;
                    HttpContext.Current.Session["Person"]      = user;
                    HttpContext.Current.Session["Company"]     = company;
                    HttpContext.Current.Session["Office"]      = office;

                    SqlConnectionStringBuilder sDataBase = new SqlConnectionStringBuilder(ConfigurationManager.ConnectionStrings["INTEGRAPRODUCCIONI"].ToString());
                    HttpContext.Current.Session["sDataBase"] = sDataBase["Database"].ToString();

                    return("200");
                }
                else
                {
                    return("404");
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                return("404");
            }
        }
Пример #2
0
        public static string lfgetCredentials()
        {
            string sResult = string.Empty;

            HttpContext.Current.Session["sauthorization_page"]     = null;
            HttpContext.Current.Session["scompanyuserinformation"] = null;

            try
            {
                int icompany = Convert.ToInt32(HttpContext.Current.Session["Company"]);
                int iperson  = Convert.ToInt32(HttpContext.Current.Session["Person"]);
                int ioffice  = Convert.ToInt32(HttpContext.Current.Session["Office"]);

                sResult = string.Concat(ICompanyController.gfCompaniaUsuarioDatosPersonales(icompany, iperson), "|", ICompanyController.gfCompaniaMensajesHtml(icompany));

                HttpContext.Current.Session["scompanyuserinformation"] = sResult;
                HttpContext.Current.Session["iModule"]             = -1;
                HttpContext.Current.Session["sauthorization_page"] = ICompanyController.gfauthorization_page(icompany, iperson);
                //HttpContext.Current.Session["sDataBase"] = "";
                sResult = string.Concat(sResult, "|OK");
                return(sResult);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                return("-409");
            }
        }
Пример #3
0
 public MainWindow(ICompanyController companyController)
 {
     InitializeComponent();
     DataContext = new MainWindowViewModel(companyController);
 }
 public CompanyEntitiesMapper(ICompanyController companyController)
 {
     _companyController   = companyController;
     _dependenciesChecker = new ModelDependenciesChecker();
 }
Пример #5
0
 public CarCompany()
 {
     InitializeComponent();
     carController     = new CarController();
     companyController = new CompanyController();
 }