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()); }
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; }
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 }
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"); } }
public void Edit_Department(Department i_Department) { BLC.BLC oBLC = new BLC.BLC(); oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"]; oBLC.Edit_Department(i_Department); }
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)); }
public void Edit_Employee(Employee i_Employee) { BLC.BLC oBLC = new BLC.BLC(); oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"]; oBLC.Edit_Employee(i_Employee); }
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); }
public List <Person> GetAllPerson() { BLC.BLC oBLC = new BLC.BLC(); oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"]; return(oBLC.GetAllPerson()); }
public List <Employee> GetAllEmployees() { BLC.BLC oBLC = new BLC.BLC(); oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"]; return(oBLC.GetAllEmployees()); }
public void Edit_Person(Person i_person) { BLC.BLC oBLC = new BLC.BLC(); oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"]; oBLC.Edit_Person(i_person); }
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); }
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)); }
public void Edit_Manager(Manager i_Manager) { BLC.BLC oBLC = new BLC.BLC(); oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"]; oBLC.Edit_Manager(i_Manager); }
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); }
public List <Department> GetAllDepartments() { BLC.BLC oBLC = new BLC.BLC(); oBLC.connStr = this.MyConfig["AppSettings:MyDBConnection"]; return(oBLC.GetAllDepartments()); }