//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "Admin")] //[HttpPost] public void RezOnayla([FromBody] int id) { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); pProvider.RezOnaylaQuery(id); }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "Admin")] //[HttpDelete] public void DeleteOnayBekleyenYuklemeler(int id) { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); pProvider.DeleteOnayBekleyenYuklemelerQuery(id); }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "Admin")] //[HttpPost] public void UpdateOnaylanmisRezervasyonYapilmamisEmirler([FromBody] PlanlamaBase obj) { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); pProvider.UpdateORYEQuery(obj); }
public void SendNotifications() { IDBManager dBManager = new MSSQLDBManager(); QueueService qs = new QueueService(dBManager); qs.DequeueAndProcess(); }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "Admin")] //[HttpPost] public void UpdateOnayBekleyenYuklemeler([FromBody] PlanlamaBase obj) { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); pProvider.UpdateOBYCmdQuery(obj); }
public void DeleteOnayBekleyenYuklemeler([FromBody] int id) // postman + { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); pProvider.DeleteOnayBekleyenYuklemelerQuery(id); }
public void DeleteOnayBekleyenYuklemelerQuery(int keyId) { //Dictionary<string, object> columnValues = new Dictionary<string, object>(); MSSQLDBManager mSSQLDB = new MSSQLDBManager(); mSSQLDB.DeleteTableRow("tblYuklemeEmirleri", "Id", keyId); }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy ="Admin")] //[HttpGet] public List <UretimYeri> GetUretimYerleri() { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); var yuklemeNoktalariList = pProvider.GetUretimYerleriList(); return(yuklemeNoktalariList); }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "Admin")] //[HttpGet] public List <YuklemeNoktasiBase> GetYuklemeNoktalari() { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); var yuklemeNoktalariList = pProvider.GetYuklemeNoktasiList(); return(yuklemeNoktalariList); }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "Admin")] //[HttpGet] public List <PlanlamaBase> GetOnaylanmisRezYapilmamisEmirler() { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); var data = pProvider.GetOnaylanmisRezYapilmamisEmirlerData(); return(data); }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = "Admin")] public IEnumerable <PlanlamaBase> GetOnayBekleyenYuklemeler() { IDBManager dBManager = new MSSQLDBManager(); IPlanlamaProvider pProvider = new PlanlamaProvider(dBManager); var data = pProvider.GetOnayBekleyenYuklemelerData(); return(data); }
public IEnumerable <RezervasyonBase> GetRezYapilmisYuklemeEmirleri() { IDBManager dBManager = new MSSQLDBManager(); IRezervasyonProvider rProvider = new RezervasyonProvider(dBManager); var data = rProvider.GetRezervasyonYapilmisYE(1); return(data); }
public IEnumerable <RezervasyonBase> GetRezBekleyenYuklemeEmirleri([FromBody] int nakliyeciId) { IDBManager dBManager = new MSSQLDBManager(); IRezervasyonProvider rProvider = new RezervasyonProvider(dBManager); var data = rProvider.GetRezervasyonBekleyenYE(nakliyeciId); return(data); }
public void RezOnaylaQuery(int keyId) { DateTime selected_row_date = DateTime.Now; Dictionary <string, object> columnValues = new Dictionary <string, object>(); columnValues.Add("OnayZamani", selected_row_date); columnValues.Add("YuklemeStatus", 1); MSSQLDBManager mSSQLDB = new MSSQLDBManager(); mSSQLDB.UpdateTableRow("tblYuklemeEmirleri", columnValues, "Id", keyId); }
private List <Claim> ValidateUserAndAssignClaims(LoginInfo user) { List <Claim> someClaims = new List <Claim>(); String checkUQuery = "SELECT * FROM [tblUser] WHERE Username=@Username AND Password=@Password"; SqlParameter[] parameters = new SqlParameter[2] { new SqlParameter("@Username", user.UserName), new SqlParameter("@Password", user.Password) }; IDBManager dBManager = new MSSQLDBManager(); var dataTable = dBManager.ExecuteQuery(checkUQuery, parameters); LoginInfo db_result = new LoginInfo(); db_result = null; if (dataTable.Rows.Count == 1) { int.TryParse(dataTable.Rows[0]["UserType"].ToString(), out int usertype); string username = dataTable.Rows[0]["Username"].ToString(); someClaims.Add(new Claim(JwtRegisteredClaimNames.UniqueName, username)); someClaims.Add(new Claim(JwtRegisteredClaimNames.NameId, Guid.NewGuid().ToString())); someClaims.Add(new Claim(ClaimTypes.Role, "Basic")); if (usertype == 1) { int.TryParse(dataTable.Rows[0]["NakliyeFirmasiId"].ToString(), out int nakliyeFirmasiId); someClaims.Add(new Claim("NakliyeFirmasiId", nakliyeFirmasiId.ToString())); int.TryParse(dataTable.Rows[0]["ProductionLocationId"].ToString(), out int productionLocationId); someClaims.Add(new Claim("ProductionLocationId", productionLocationId.ToString())); return(someClaims); } if (usertype == 2) { someClaims.Add(new Claim(ClaimTypes.Role, "Admin")); return(someClaims); } } return(null); }