/// <summary> /// Method for Update the del_flag in organization table /// </summary> /// <param name="organization_Id"></param> /// <returns></returns> public bool delete_organization_details(int organization_Id) { try { //Connection string for connecting the database var DbContent = DB_config.db_conection(); // Query for update the del_flag value as true in organization table var contractid = DbContent.TblOrganizations.First(i => i.OrganizationId == organization_Id); contractid.DelFlag = true; //code for save the changes to the database DbContent.SaveChanges(); return(true); } catch { return(false); } }
/// <summary> /// Method for check given organizational details is exits or not /// </summary> /// <param name="organization_code"></param> /// <param name="organization_email"></param> /// <param name="organization_contact"></param> /// <returns></returns> public int check_organization_details_exists(string organization_code, string organization_email, string organization_contact) { try { //Connection string for connecting the database var DbContent = DB_config.db_conection(); //Query for checking the given organization details exists or not var contractid = (from cn in DbContent.TblOrganizations where cn.OrganizationCode == organization_code && cn.OrganizationEmail == organization_email && cn.OrganizationContact == organization_contact select new { cn.OrganizationId }).Count(); return(contractid); } catch { throw; } }
/// <summary> /// Method for get the details of the login employee /// </summary> /// <param name="api0001_inValue"></param> /// <returns></returns> public List <API0001_OutModel> getLoginDetails(API0001_InModel api0001_inValue) { try { //Connection string for connecting the database var DbContent = DB_config.db_conection(); // Query for get the details of the login employee var loginDetails = (from cn in DbContent.TblLogins where cn.OrganizationCode == api0001_inValue.organization_code && cn.LoginEmployeeCode == api0001_inValue.employee_code && cn.LoginPassword == api0001_inValue.password select new API0001_OutModel() { employee_code = cn.LoginEmployeeCode, organization_code = cn.OrganizationCode }).ToList(); return(loginDetails); } catch { throw; } }
public async Task <string> Get() { var DbContent = DB_config.db_conection(); TblOrganization tblOrganizations = new TblOrganization(); tblOrganizations.City = "Erunakulam"; DbContent.TblOrganizations.Add(tblOrganizations); //upload Multiple files List <string> s = new List <string>(); s.Add("E:\\a.txt"); s.Add("E:\\b.txt"); s.Add("E:\\ac.txt"); FileOperations.upload(s); //How to call Download method. FileDownloadBase64String fileinfo = await FileOperations.Download("b.txt"); // Call Log implementation method. // LogModel logModel = new LogModel(); logModel.LogType = LogTypes.Error; logModel.Message = "Success"; Log log = new Log(); log.LogWrite(logModel); // Maill function GMailServices gMailServices = new GMailServices(); gMailServices.SendMail("*****@*****.**", "Test", "Hello Ramabose"); // insert and update samples //var org = new TblOrganization //{ // OrganizationName = "", // OrganizationCode = "", // OrganizationEmail = "", // OrganizationAddress1 = "", // OrganizationContact = "", // OrganizationType = "", // OrganizationAddress2 = "", // City = "", // State = "", // PinCode = "", // OrganizationLogo = "", // DelFlag = true, // CreatedDate = DateTime.Now, // UpdatedDate = DateTime.Now, //}; //DbContent.TblOrganizations.Add(org); //DbContent.SaveChanges(); return("Good"); }