// GET: ApplicationTypes public Object FreeTrial([FromBody] FreeTrial FTrial) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string AppType_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); try { cnn.Open(); AppType_Query = "insert into UIFreeTrial(MobileNo,EmailId,MobileDeviceId,SlotCode,TrainerId,PlanId,SessionDate,UMID,CreatedBy,CreatedOn,IsDeleted,IsActive) values('" + FTrial.MobileNo + "','" + FTrial.EmailId + "','" + FTrial.MobileDeviceId + "','" + FTrial.SlotCode + "','" + FTrial.TrainerId + "','" + FTrial.PlanId + "','" + FTrial.SessionDate + "','" + FTrial.UMID + "','" + FTrial.CreatedBy + "','" + ServerDateTime + "',0,1) SELECT @@IDENTITY;"; SqlCommand tm_cmd = new SqlCommand(AppType_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "Success"; Pdetails.transactionId = a; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }
// GET: ApplicationTypes public Object PaymentDetails([FromBody] RazorPaymentcs Payment) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string AppType_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); try { cnn.Open(); AppType_Query = "insert into PaymentGateway(GatewayProviderName,OrderId,BranchCode,MobileNo,ModeOfPayment,Amount,Currency,receipt,payment_capture,notes,TransactionDate,Signature,CreatedOn,CreatedBy,IsDeleted,IsActive) values('" + Payment.GatewayProviderName + "','" + Payment.OrderId + "','" + Payment.BranchCode + "','" + Payment.MobileNo + "','" + Payment.ModeOfPayment + "','" + Payment.Amount + "','" + Payment.Currency + "','" + Payment.receipt + "','" + Payment.payment_capture + "','" + Payment.notes + "','" + Payment.TransactionDate + "','" + Payment.Signature + "','" + ServerDateTime + "','" + Payment.CreatedBy + "',1,0) SELECT @@IDENTITY;"; SqlCommand tm_cmd = new SqlCommand(AppType_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "Success"; Pdetails.transactionId = a; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }
// GET: ApplicationTypes public Object DashboardTextPost([FromBody] DashboardText dt) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string olPackage_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); try { cnn.Open(); olPackage_Query = "insert into DashboardText(DisplayID,Text,Comments,CreatedBy,CreatedOn,IsDeleted,IsActive,ScreenId) values('" + dt.displayId + "','" + dt.text + "','" + dt.comments + "','" + dt.createdBy + "','" + ServerDateTime + "',0,1," + dt.screenId + ") SELECT @@IDENTITY;"; SqlCommand tm_cmd = new SqlCommand(olPackage_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "Success"; Pdetails.transactionId = a; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }
// GET: ApplicationTypes public Object OnlineTrainersSlotMappingPost([FromBody] OnlineTrainersSlotMapping mts) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string olPackage_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); try { cnn.Open(); olPackage_Query = "insert into OnlineTrainersSlotMapping(BranchCode,TrainerCode,TrainerName,SessionCode,SessionName,SlotCode,SlotName,PackageCode,PackageName,Description,CreatedBy,CreatedOn,IsDeleted,IsActive) values('" + mts.branchCode + "','" + mts.trainerCode + "','" + mts.trainerName + "','" + mts.sessionCode + "','" + mts.sessionName + "','" + mts.slotCode + "','" + mts.slotName + "','" + mts.packageCode + "','" + mts.packageName + "','" + mts.description + "','" + mts.createdBy + "','" + ServerDateTime + "',0,1) SELECT @@IDENTITY;"; SqlCommand tm_cmd = new SqlCommand(olPackage_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "Success"; Pdetails.transactionId = a; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }
// GET: ApplicationTypes public Object OnlinePackagePost([FromBody] OnlinePackagePost OnlinePackage) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string olPackage_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); try { cnn.Open(); olPackage_Query = "insert into OnlinePackages(BranchCode,EnquireTypeNo,PackageID,PackageName,PackageCost,DiscountPercentage,NumberOfSession,NumberOfDaysValidity,Description,CreatedBy,CreatedOn,IsDeleted,IsActive) values('" + OnlinePackage.branchCode + "','" + OnlinePackage.enquireTypeNo + "','" + OnlinePackage.packageId + "','" + OnlinePackage.packageName + "','" + OnlinePackage.packageCost + "','" + OnlinePackage.discountPercentage + "','" + OnlinePackage.noOFSessions + "','" + OnlinePackage.nooOfDateValidity + "','" + OnlinePackage.description + "','','" + ServerDateTime + "',0,1) SELECT @@IDENTITY;"; SqlCommand tm_cmd = new SqlCommand(olPackage_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "Success"; Pdetails.transactionId = a; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }
// GET: ApplicationTypes public Object OnLineTrainerMeetingPost([FromBody] OnLineTrainerMeetingPassword MeetingPassword) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string olPackage_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); try { cnn.Open(); olPackage_Query = "insert into OnLineTrainerMeetingPassword(ZoomId,ZoomUserName,ZoomPassword,ZoomUrl,GoogleId,GoogleUserName,GooglePassword,GoogleUrl,TrainerCode,CreatedBy,CreatedOn,IsDeleted,IsActive) values('" + MeetingPassword.ZoomId + "','" + MeetingPassword.ZoomUserName + "','" + MeetingPassword.GooglePassword + "','" + MeetingPassword.ZoomUrl + "','" + MeetingPassword.GoogleId + "','" + MeetingPassword.GoogleUserName + "','" + MeetingPassword.GooglePassword + "','" + MeetingPassword.GoogleUrl + "','" + MeetingPassword.TrainerCode + "','" + MeetingPassword.CreatedBy + "','" + ServerDateTime + "',0,1) SELECT @@IDENTITY;"; SqlCommand tm_cmd = new SqlCommand(olPackage_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "Success"; Pdetails.transactionId = a; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }
public Object PaymentDetails([FromBody] RazorPaymentcs Payment) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string AppType_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); try { cnn.Open(); AppType_Query = "update PaymentGateway set payment_capture='" + Payment.payment_capture + "',TransactionStatus='" + Payment.TransactionStatus + "',receipt='" + Payment.receipt + "',notes='" + Payment.notes + "',Signature='" + Payment.Signature + "' where OrderId='" + Payment.OrderId + "' SELECT @@IDENTITY; "; SqlCommand tm_cmd = new SqlCommand(AppType_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "success"; Pdetails.transactionId = Payment.TransactionId; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }
public Object DashboardImage([FromBody] DashboardImages di) { string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string olPackage_Query = ""; PaymentDetailsPost Pdetails = new PaymentDetailsPost(); string b = di.imageUrl; b = b.Substring(b.IndexOf(",") + 1); string ImageUrl = GetPhotoUrl(b, di.displayId + Convert.ToString(imgname())); try { cnn.Open(); olPackage_Query = "insert into DashboardImages(AppId,DisplayId,Image,ImageURL,CreatedBy,CreatedOn,IsDeleted,IsActive,ScreenId) values('" + di.appId + "','" + di.displayId + "','" + b + "','" + ImageUrl + "','" + di.createdBy + "','" + ServerDateTime + "',0,1," + di.screenId + ") SELECT @@IDENTITY;"; SqlCommand tm_cmd = new SqlCommand(olPackage_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteScalar()); Pdetails.status = "Success"; Pdetails.transactionId = a; } catch (Exception ex) { Pdetails.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(Pdetails); return(sJSONResponse); }