コード例 #1
0
 public ProducerListViewModel(BLC.BLC blc, Action <int> tab_no)
 {
     this.blc      = blc;
     _tab_no       = tab_no;
     ProducersList = new ObservableCollection <ProducerViewModel>(
         blc.GetProducers().Select(p => new ProducerViewModel(p)));
     AddProducerCommand = new RCommand(_ => AddProducer());
 }
コード例 #2
0
 public InstrumentListViewModel(BLC.BLC blc, Action <int> tab_no, ObservableCollection <ProducerViewModel> producers)
 {
     this.blc    = blc;
     _tab_no     = tab_no;
     Instruments = new ObservableCollection <InstrumentViewModel>(
         blc.GetInstruments().Select(p => new InstrumentViewModel(p)));
     CreateInstrumentCommand = new RCommand(_ => CreateInstrument());
     DeleteInstrumentCommand = new RCommand(_ => DeleteInstrument(), _ => CurrentInstrument != null);
     SaveInstrumentCommand   = new RCommand(_ => SaveInstrument(), _ => CurrentInstrument != null);
     AvailableProducers      = producers;
 }
コード例 #3
0
 static void Main(string[] args)
 {
     #region Declaration And Initialization Section.
     string             _ConnectionString = ConfigurationManager.AppSettings["CONN_STR"];
     BLC.BLCInitializer oBLCInitializer   = new BLC.BLCInitializer();
     oBLCInitializer.ConnectionString  = _ConnectionString;
     oBLCInitializer.OwnerID           = 1;
     oBLCInitializer.UserID            = 1;
     oBLCInitializer.Messages_FilePath = ConfigurationManager.AppSettings["BLC_MESSAGES"];
     BLC.BLC     oBLC                 = new BLC.BLC(oBLCInitializer);
     string      str_Option           = string.Empty;
     string      str_BH_ID            = string.Empty;
     string      str_AC_ID            = string.Empty;
     string      str_Bucket_Name      = string.Empty;
     string      str_Main_Folder_Path = string.Empty;
     Tools.Tools oTools               = new Tools.Tools();
     #endregion
 }
コード例 #4
0
        public async Task <string> Post([FromForm] FileUpload objfile)
        {
            if (objfile.files.Length > 0)
            {
                try
                {
                    if (!Directory.Exists(_environment.WebRootPath + "\\uploads\\"))
                    {
                        Directory.CreateDirectory(_environment.WebRootPath + "\\uploads\\");
                    }
                    using (FileStream fileStream = System.IO.File.Create(_environment.WebRootPath + "\\uploads\\" + objfile.files.FileName))
                    {
                        objfile.files.CopyTo(fileStream);

                        Person i_person = new Person();
                        i_person.PERSON_ID = 1;
                        i_person.NAME      = "Osman";
                        i_person.IMG_URL   = "\\uploads\\" + objfile.files.FileName;


                        BLC.BLC oBLC = new BLC.BLC();
                        oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
                        oBLC.Edit_Person(i_person);


                        fileStream.Flush();
                        return("\\uploads\\" + objfile.files.FileName);
                    }
                }
                catch (Exception ex)
                {
                    return(ex.ToString());
                }
            }
            else
            {
                return("Failed");
            }
        }
コード例 #5
0
 public void Edit_Department(Department i_Department)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     oBLC.Edit_Department(i_Department);
 }
コード例 #6
0
 public List <Employee> Get_Youngest_Employee(Params_Delete_Department i_Params_Delete_Department)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     return(oBLC.Get_Youngest_Employee(i_Params_Delete_Department));
 }
コード例 #7
0
 public void Edit_Employee(Employee i_Employee)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     oBLC.Edit_Employee(i_Employee);
 }
コード例 #8
0
 public void Delete_Employee(Params_Delete_Employee i_Params_Delete_Employee)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     oBLC.Delete_Employee(i_Params_Delete_Employee);
 }
コード例 #9
0
 public List <Person> GetAllPerson()
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     return(oBLC.GetAllPerson());
 }
コード例 #10
0
 public List <Employee> GetAllEmployees()
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     return(oBLC.GetAllEmployees());
 }
コード例 #11
0
 public void Edit_Person(Person i_person)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     oBLC.Edit_Person(i_person);
 }
コード例 #12
0
 public void Delete_Manager(Params_Delete_Manager i_Params_Delete_Manager)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     oBLC.Delete_Manager(i_Params_Delete_Manager);
 }
コード例 #13
0
 public List <Manager> GetAllManagersOfDepartment(Params_Delete_Department i_Params_Delete_Department)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     return(oBLC.GetAllManagersOfDepartment(i_Params_Delete_Department));
 }
コード例 #14
0
 public void Edit_Manager(Manager i_Manager)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     oBLC.Edit_Manager(i_Manager);
 }
コード例 #15
0
 public void Delete_Department(Params_Delete_Department i_Params_Delete_Department)
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     oBLC.Delete_Department(i_Params_Delete_Department);
 }
コード例 #16
0
 public List <Department> GetAllDepartments()
 {
     BLC.BLC oBLC = new BLC.BLC();
     oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"];
     return(oBLC.GetAllDepartments());
 }