public static BindaResponseData GetData(GetDatavalue obj) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); BindaResponseData res = new BindaResponseData(); List <GridBind> Gridlist = new List <GridBind>(); List <Count> BindCountlist = new List <Count>(); var Result = dbcontext.MultipleResults("[dbo].[Sp_RegionMaster]").With <GridBind>().With <Count>(). Execute("@QueryType", "@PageCount", "@SearchText", "@AppId", "@EntityId", "GetData1", obj.PageCount, obj.SearchText, obj.AppId, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj.EntityId.Replace("_", "%")))); res.GridBindlist = Result[0].Cast <GridBind>().ToList(); res.BindCountlist = Result[1].Cast <Count>().ToList(); return(res); } catch (Exception ex) { //return null; throw ex; } }
public SaveResponseData1 SaveData(SaveJsonData1 obj) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); SaveResponseData1 res = new SaveResponseData1(); string[] sponsorcodearr = obj.sponsorcodearr; string StatesId = ""; for (int i = 0; i < sponsorcodearr.Length; i++) { StatesId += sponsorcodearr[i]; StatesId += ","; } StatesId = StatesId.TrimEnd(','); List <SaveJsonData1> InsertDatalist = new List <SaveJsonData1>(); // List<Count> MandateCountlist = new List<Count>() var Result = dbcontext.MultipleResults("[dbo].[Sp_RegionMaster]").With <InsertData>(). Execute("@QueryType", "@RegionCode", "@RegionName", "@strTable", "@AppId", "@EntityId", "@UserId", "InsertData", obj.RegionCode, obj.RegionName, StatesId, obj.AppId, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj.EntityId.Replace("_", "%"))), Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj.UserId.Replace("_", "%")))); res.InsertDatalist = Result[0].Cast <InsertData>().ToList(); return(res); } catch (Exception ex) { throw ex; } }
public Dictionary <string, object> SaveParentmenuItem(string ParentmenuItem) { try { using (QuickCheck_AngularEntities Dc = new QuickCheck_AngularEntities()) { var _ParentName = (from p in Dc.TblParentMenus where p.ParentMenuName == ParentmenuItem select ParentmenuItem).ToList(); if (_ParentName.Count == 0 && (ParentmenuItem != null || ParentmenuItem != "")) { TblParentMenu TP = new TblParentMenu(); TP.CreatedBy = 2; TP.CreatedOn = DateTime.Now; TP.IsActive = true; TP.IsDeleted = false; TP.OrderNo = (Dc.TblParentMenus.DefaultIfEmpty().Max(p => p == null ? 0 : p.OrderNo) + 1);// (Dc.TblParentMenus.Select(x => x.OrderNo == null ? 0 : x.OrderNo).Max() + 1); TP.ParentMenuName = ParentmenuItem; Dc.TblParentMenus.Add(TP); Dc.SaveChanges(); } var _Parent = (from LS in Dc.TblParentMenus where LS.IsActive == true select new { LS.ParentID, LS.ParentMenuName }); DataTable dtParent = Common.LINQResultToDataTable(_Parent); dtParent.TableName = "Table"; return(ClsJson.JsonMethods.ToJson(dtParent)); } } catch (Exception ex) { return(null); } }
public Dictionary <string, object> BindSidebarLinks() { DataSet ds = new DataSet(); try { using (QuickCheck_AngularEntities Dc = new QuickCheck_AngularEntities()) { // var _Links = Dc.Tbl_Links.Where(x => x.IsActive == true).Select(x => new { x.IconName, x.LinkID, x.LinkName, x.url, x.OrderNo, x.ParetmenuID }); //var _ParentLinks = Dc.TblParentMenus.Where(x => x.IsActive == true).Select(x => new { x.ParentID, x.ParentMenuName }); var _ParentLinks = Dc.Tbl_Links.Where(x => x.IsActive == true && x.ParetmenuID == 0).Select(x => new { LinkID = x.LinkID.ToString(), x.LinkName, url = x.url.Trim(), IsParent = 0, x.OrderNo, IconName = x.IconName }).Union (Dc.TblParentMenus.Where(x => x.IsActive == true).Select(x => new { LinkID = x.ParentID.ToString(), LinkName = x.ParentMenuName, url = "", IsParent = 1, OrderNo = 3, IconName = "" })).OrderBy(x => new { x.OrderNo, x.LinkName }).ToList(); var _Links = Dc.Tbl_Links.Where(x => x.IsActive == true && x.ParetmenuID != 0).Select(x => new { x.LinkID, x.LinkName, url = x.url.Trim(), x.ParetmenuID }); DataTable dtLink = Common.LINQResultToDataTable(_Links); dtLink.TableName = "Table1"; DataTable dtParentLinks = Common.LINQResultToDataTable(_ParentLinks); dtParentLinks.TableName = "Table"; ds.Tables.Add(dtLink); ds.Tables.Add(dtParentLinks); return(ClsJson.JsonMethods.ToJson(ds)); } } catch (Exception ex) { var e = ex; return(null); } }
public static void QRGenerator(string MandateID, string EntityId, string Refrence1, string AppId) { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); string code = MandateID + "_" + Refrence1; QRCodeGenerator qrGenerator = new QRCodeGenerator(); QRCodeGenerator.QRCode qrCode = qrGenerator.CreateQrCode(code, QRCodeGenerator.ECCLevel.H); System.Web.UI.WebControls.Image imgBarCode = new System.Web.UI.WebControls.Image(); imgBarCode.Height = 250; imgBarCode.Width = 250; using (Bitmap bitMap = qrCode.GetGraphic(20)) { using (MemoryStream ms = new MemoryStream()) { bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png); byte[] byteImage = ms.ToArray(); imgBarCode.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(byteImage); string result = Convert.ToBase64String(byteImage, 0, byteImage.Length); string check = CreateImage(result.ToString(), MandateID, AppId); if (check != "") { var Result = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").Execute("@QueryType", "@EntityId", "@MandateId", "@QRCodeImagepath", "QRCodeImagepath", EntityId, MandateID, check); } } } }
public static GetMandateDataResponseData SetData() { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); GetMandateDataResponseData res = new GetMandateDataResponseData(); List <GetMonth> GetMonthlist = new List <GetMonth>(); List <GetYear> GetYearlist = new List <GetYear>(); var Result = dbcontext.MultipleResults("[dbo].[sp_MandateAnalysis]").With <GetMonth>().With <GetYear>(). Execute("@QueryType", "GetMonthAndYear"); res.GetMonthlist = Result[0].Cast <GetMonth>().ToList(); res.GetYearlist = Result[1].Cast <GetYear>().ToList(); return(res); } catch (Exception ex) { //return null; throw ex; } }
public static GetMandateDataResponseData PhysicalSearchData(GetMandateData objectname) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); GetMandateDataResponseData res = new GetMandateDataResponseData(); List <GridData> GridDatalist = new List <GridData>(); List <Count> MandateCountlist = new List <Count>(); var Result = dbcontext.MultipleResults("[dbo].[sp_MandateAnalysis]").With <GridData>().With <Count>(). Execute("@QueryType", "@Month", "@Year", "@topVal", "GetMandateData_Physical", objectname.Month, objectname.Year, objectname.Total); res.GridDatalist = Result[0].Cast <GridData>().ToList(); res.MandateCountlist = Result[1].Cast <Count>().ToList(); return(res); } catch (Exception ex) { throw ex; } }
public static UpdateResponseData UpdateData(UpdateJsonData obj1) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); UpdateResponseData res = new UpdateResponseData(); List <UpdateData> UpdateDatalist = new List <UpdateData>(); // List<Count> MandateCountlist = new List<Count>(); var Result = dbcontext.MultipleResults("[dbo].[Sp_ProductMaster]").With <UpdateData>(). Execute("@QueryType", "@ProductCode", "@ProductName", "@AppId", "@EntityId", "@UserId", "@ProductId", "UpdateData", obj1.code, obj1.name, obj1.AppId, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj1.EntityId.Replace("_", "%"))), Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj1.UserId.Replace("_", "%"))), obj1.ProductId); res.UpdateDatalist = Result[0].Cast <UpdateData>().ToList(); //res.UpdateDatalist = Result[0].Cast<UpdateData>().ToList(); return(res); } catch (Exception ex) { throw ex; } }
public string GetEncryptedmandateId(GetMandateReq Data) { string URl = ""; string TempId = ""; try { TempId = Dbsecurity.Decrypt(Data.AppId) + Dbsecurity.Decrypt(Data.MandateId); TempId = Global.ReverseString(TempId); TempId = Global.CreateRandomCode(6) + TempId; List <GetCredential> GetCredentialList = new List <GetCredential>(); QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); var Result = dbcontext.MultipleResults("[dbo].[Sp_GetMandatemodeData]").With <GetCredential>(). Execute("@QueryType", "@AppId", "GetEntityCredential", Dbsecurity.Decrypt(Data.AppId)); GetCredentialList = Result[0].Cast <GetCredential>().ToList(); try { dbcontext = new QuickCheck_AngularEntities(); var Result1 = dbcontext.MultipleResults("[dbo].[sp_ESign]").With <doneres>(). Execute("@QueryType", "@MandateId", "@WebAppUrl", "@EncodedMandateID", "@AppId", "@EncodedAppId", "SaveLinkWithoutSMS", Dbsecurity.Decrypt(Data.MandateId), GetCredentialList[0].EWebAppUrl, TempId, Dbsecurity.Decrypt(Data.AppId), Data.AppId); URl = "/MandateDetails?ID=" + TempId + "&AppId=" + Data.AppId; // string WebAppUrl = ConfigurationManager.AppSettings["EWebAppUrl"].ToString(); // CommonManger.FillDatasetWithParam("sp_ESign", ); } catch (Exception ex) { } } catch (Exception ex) { return("0"); } return(URl); }
public static BindResponseData BindData(BindJsonData obj2) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); BindResponseData res = new BindResponseData(); //CountResponseData res = new CountResponseData(); List <GridBind> GridBindlist = new List <GridBind>(); List <Count> BindCountlist = new List <Count>(); var Result = dbcontext.MultipleResults("[dbo].[Sp_ProductMaster]").With <GridBind>().With <Count>(). Execute("@QueryType", "@PageCount", "@SearchText", "@AppId", "@EntityId", "BindGrid", obj2.PageCount, obj2.SearchText, obj2.AppId, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj2.EntityId.Replace("_", "%")))); res.GridBindlist = Result[0].Cast <GridBind>().ToList(); res.BindCountlist = Result[1].Cast <Count>().ToList(); return(res); } catch (Exception ex) { throw ex; } }
public static string SendMailCount(string MandateID, string AppId, string EmailCount, string SmsCount, int SMSLength, string MessageRequestId) { string status = ""; try { //SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[Convert.ToString(AppId)].ConnectionString); //string query = "Sp_SendEmail"; //SqlCommand cmd = new SqlCommand(query, con); //cmd.CommandType = CommandType.StoredProcedure; //cmd.Parameters.AddWithValue("@QueryType", "SendMail"); //cmd.Parameters.AddWithValue("@MandateID", MandateID); //cmd.Parameters.AddWithValue("@EmailCount", EmailCount); //cmd.Parameters.AddWithValue("@SmsCount", SmsCount); //cmd.Parameters.AddWithValue("@SMSLength", SMSLength); //cmd.Parameters.AddWithValue("@MessageRequestId", MessageRequestId); QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); var Result = dbcontext.MultipleResults("[dbo].[Sp_SendEmail]").With <doneres>(). Execute("@QueryType", "@MandateID", "@EmailCount", "@SmsCount", "@SMSLength", "@MessageRequestId", "@AppId", "SendMail", MandateID, EmailCount, SmsCount, SMSLength.ToString(), MessageRequestId, AppId); } catch (Exception ex) { Console.Out.WriteLine("-----------------"); Console.Out.WriteLine(ex.Message); return(ex.Message); } return(status); }
public Dictionary <string, object> GetMandateData(string ID) { try { List <GetMandateData> Gridlist = new List <GetMandateData>(); QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); var results = dbcontext.MultipleResults("[dbo].[sp_Temp_BulkImageExcelReceivingApproval]").With <GetMandateData>() .Execute("@Querytype", "@BIBE_Count", "GetMandateData", ID); Gridlist = results[0].Cast <GetMandateData>().ToList(); DataTable dt = new DataTable(); dt = ToDataTable(Gridlist); //foreach (DataRow row in dt.Rows) //{ // row["BankACNumber"] = Dbsecurity.Decrypt(Convert.ToString(row["AcNo"])); // row["Amount"] = Dbsecurity.Decrypt(Convert.ToString(row["AmountRupees"])); // row["PhoneNumber"] = Dbsecurity.Decrypt(Convert.ToString(row["PhoneNumber"])); // row["EmailID"] = Dbsecurity.Decrypt(Convert.ToString(row["EmailId"])); //} DataSet ds = new DataSet(); ds.Tables.Add(dt); return(ClsJson.JsonMethods.ToJson(ds)); } catch (Exception ex) { throw ex; } }
public Dictionary <string, object> BindEditData(string LinkID) { DataSet ds = new DataSet(); try { using (QuickCheck_AngularEntities Dc = new QuickCheck_AngularEntities()) { var _LinkList = (from LS in Dc.Tbl_Links where LS.IsActive == true && LS.LinkID.ToString() == LinkID select LS).ToList(); DataTable dtLink = Common.LINQResultToDataTable(_LinkList); dtLink.TableName = "Table"; var _RoleLinkBindings = (from LS in Dc.TblRoleLinkBindings join RM in Dc.TblRoleMasters on LS.RoleID equals RM.RoleID where LS.IsActive == true && LS.LinkID.ToString() == LinkID select new { LS.RoleID, RM.RoleName }).ToList(); DataTable dtRoleLinkBindings = Common.LINQResultToDataTable(_RoleLinkBindings); dtRoleLinkBindings.TableName = "Table1"; ds.Tables.Add(dtLink); ds.Tables.Add(dtRoleLinkBindings); return(ClsJson.JsonMethods.ToJson(ds)); } } catch (Exception ex) { return(null); } }
public static GridExportExcelResponseData1 BindExportExcelData1(BindExportExcelJsonData1 obj3) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); GridExportExcelResponseData1 res = new GridExportExcelResponseData1(); //CountResponseData res = new CountResponseData(); List <GridExportExcelBind1> GridBindExportlist1 = new List <GridExportExcelBind1>(); var Result = dbcontext.MultipleResults("[dbo].[Sp_RegionMaster]").With <GridExportExcelBind1>(). Execute("@QueryType", "@AppId", "@EntityId", "GetData", obj3.AppId, Dbsecurity.Decrypt(HttpContext.Current.Server.UrlDecode(obj3.EntityId.Replace("_", "%")))); res.GridBindExportlist1 = Result[0].Cast <GridExportExcelBind1>().ToList(); return(res); } catch (Exception ex) { throw ex; } }
public static string UpdateIsPHysical(string MandateId, string UserId, String AppId) { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); var Result = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <UpdateNameRes>(). Execute("@QueryType", "@MandateId", "@AppId", "@UserId", "UpdateIsPHysical", MandateId, AppId, Dbsecurity.Decrypt(UserId)); return("1"); }
public static IEnumerable <pennyDetails> Getpennydata(string IFSC, string AppId) { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <pennyDetails> nn = new List <pennyDetails>(); var Result = dbcontext.MultipleResults("[dbo].[sp_GetPennydropdetails]").With <pennyDetails>().Execute("@QueryType", "@Ifsc", "@AppId", "getpennydata", IFSC, AppId); nn = Result[0].Cast <pennyDetails>().ToList(); return(nn); }
public static string getTraceNo(string AppId) { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <InsertrequestNOModel> InsertrequestNOModelllist = new List <InsertrequestNOModel>(); var Result = dbcontext.MultipleResults("[dbo].[sp_Payment]").With <InsertrequestNOModel>().Execute("@QueryType", "@AppId", "getTraceNo", AppId); InsertrequestNOModelllist = Result[0].Cast <InsertrequestNOModel>().ToList(); return(Convert.ToString(InsertrequestNOModelllist[0].RequestNo)); }
public static string UpdateName(UpdateName Data) { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); //int value = CommonManger.IntMethodWithParam("sp_Payment", "@QueryType", "@Type", // "@MandateId", // "UpdateName", rdoName.SelectedValue, ViewState["id"].ToString()); var Result = dbcontext.MultipleResults("[dbo].[sp_Payment]").With <UpdateNameRes>(). Execute("@QueryType", "@Type", "@MandateId", "@Appid", "UpdateName", Data.RadioValue, Dbsecurity.Decrypt(Data.MandateId), Dbsecurity.Decrypt(Data.AppId)); return("1"); }
public IEnumerable <ResponseFlag> FinalUploadCropImage(UploadMandateModel context) { List <ResponseFlag> common = new List <ResponseFlag>(); ResponseFlag Flag = new ResponseFlag(); try { string croppedFileName = string.Empty; string filePath = string.Empty; string ID = Convert.ToString(Dbsecurity.Decrypt(context.MdtID)); string No = Convert.ToString(Dbsecurity.Decrypt(context.RefrenceNo)); string APPId = Convert.ToString(Dbsecurity.Decrypt(context.AppID)); string UserId = Convert.ToString(Dbsecurity.Decrypt(context.UserId)); string JPGFilepath = string.Empty; croppedFileName = ConfigurationManager.AppSettings["DownloadFileName" + APPId].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + No + ".tif"; filePath = "../MandateFile/" + APPId + "/" + ID + "/" + croppedFileName; string MandateId = ID; if (File.Exists(HttpContext.Current.Server.MapPath("~/MandateFile/" + APPId + "/" + MandateId + "/" + ConfigurationManager.AppSettings["DownloadFileName"].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + Convert.ToString(No) + ".tif")) && File.Exists(HttpContext.Current.Server.MapPath("~/MandateFile/" + APPId + "/" + MandateId + "/" + ConfigurationManager.AppSettings["DownloadFileName"].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + Convert.ToString(No) + ".jpg"))) { croppedFileName = ConfigurationManager.AppSettings["DownloadFileName" + APPId].ToString() + "_" + DateTime.Now.ToString("ddMMyyyy") + "_" + No + ".jpg"; JPGFilepath = "../MandateFile/" + APPId + "/" + ID + "/" + croppedFileName; QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <GetLogo> dataList1 = new List <GetLogo>(); var Result2 = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <GetLogo>().Execute("@QueryType", "@TIPPath", "@PNGPath", "@MandateId", "@UserId", "UpdatePNGTIP", Convert.ToString(filePath), Convert.ToString(JPGFilepath), Convert.ToString(ID), Convert.ToString(UserId)); Flag.Flag = "1"; Flag.FlagValue = "Mandate uploaded successfully"; common.Add(Flag); } else { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <GetLogo> dataList1 = new List <GetLogo>(); var Result2 = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <GetLogo>().Execute("@QueryType", "@TIPPath", "@PNGPath", "@MandateId", "@UserId", "UpdatePNGTIP", null, null, ID, UserId); Flag.Flag = "1"; Flag.FlagValue = "Image is not Properly Uploaded,Please Upload again"; common.Add(Flag); } // } } catch (Exception ex) { Flag.Flag = "1"; Flag.FlagValue = "Image is not Properly Uploaded,Please Upload again"; common.Add(Flag); } return(common); }
public static void UpdatePrintcount(string AppId, string MandateId, string UserId) { //int value = CommonManger.IntMethodWithParam("sp_Payment", "@QueryType", "@MandateId", "@UserId", "IncreaseCounter", ViewState["id"].ToString(), Convert.ToString(Iace.User.CurrentUser.User.UserId)); try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <UpdateNameRes> CutterImagList = new List <UpdateNameRes>(); var Result = dbcontext.MultipleResults("[dbo].[sp_Payment]").With <UpdateNameRes>().Execute("@QueryType", "@MandateId", "@UserId", "@AppId", "IncreaseCounter", MandateId, UserId, AppId); } catch (Exception ex) { } }
public static string UpdateMandateModeMethod(UpdateSelectModeModal MData) { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <UpdateSelectModeRes> UpdateSelectModeResList = new List <UpdateSelectModeRes>(); try { var Result = dbcontext.MultipleResults("[dbo].[sp_ENach]").With <UpdateSelectModeRes>(). Execute("@QueryType", "@MandateId", "@IsPhysical", "@Enach", "@MobileNo", "@EmailId", "@EMandatetype", "@Amount", "@AppId", "@AmountRupeesInWords", "UpdateENach", Dbsecurity.Decrypt(MData.MandateId), MData.Physical, MData.EMandate, MData.MobileNumber, MData.Email, MData.EMandatetype, MData.Amount, Dbsecurity.Decrypt(MData.AppId), MData.AmountRupeesInWords); UpdateSelectModeResList = Result[0].Cast <UpdateSelectModeRes>().ToList(); } catch (Exception ex) { } return(UpdateSelectModeResList[0].done); }
public static EMandateTypeDataList Selectdata(SelectModeModal MData) { EMandateTypeDataList res = new EMandateTypeDataList(); QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); try { var Result = dbcontext.MultipleResults("[dbo].[Sp_GetMandatemodeData]").With <EMandateTypeDataModal>(). Execute("@QueryType", "@MandateId", "@Appid", "GetMandatemode", Dbsecurity.Decrypt(MData.MandateId), Dbsecurity.Decrypt(MData.AppId)); res.EMandateTypeDataModalList = Result[0].Cast <EMandateTypeDataModal>().ToList(); } catch (Exception ex) { } return(res); }
public BulkImageExcelReceivingApprovalModallist FetchData(BulkImageExcelReceivingApprovalModal Acdata) { try { BulkImageExcelReceivingApprovalModallist res = new BulkImageExcelReceivingApprovalModallist(); QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); var Result = dbcontext.MultipleResults("sp_Temp_BulkImageExcelReceivingApproval").With <BulkImageExcelReceivingApprovalModal>().Execute("@QueryType", "FetchData"); res.BulkImageExcelReceivingApprovalModalList = Result[0].Cast <BulkImageExcelReceivingApprovalModal>().ToList(); return(res); } catch (Exception ex) { return(null); } }
public int SaveLink(LinkSetup_InsertModel LI) { DataSet ds = new DataSet(); try { using (QuickCheck_AngularEntities Dc = new QuickCheck_AngularEntities()) { if (LI.LinkID == 0) { Tbl_Links TL = new Tbl_Links(); TL.LinkName = LI.LinkName; TL.IsActive = LI.IsActive; TL.IconName = LI.IconName; TL.OrderNo = LI.OrderNo; TL.Purpose = LI.Purpose; TL.url = LI.url; TL.ParetmenuID = LI.ParentMenuID; TL.IsDeleted = !LI.IsActive; TL.CreatedOn = DateTime.Now; TL.ModifiedOn = new DateTime(1900, 1, 1); Dc.Tbl_Links.Add(TL); Dc.SaveChanges(); } else { var _R = Dc.Tbl_Links.Where(d => d.LinkID == LI.LinkID); foreach (var k in _R) { k.LinkName = LI.LinkName; k.IsActive = LI.IsActive; k.IconName = LI.IconName; k.OrderNo = LI.OrderNo; k.Purpose = LI.Purpose; k.url = LI.url; k.ParetmenuID = LI.ParentMenuID; k.IsDeleted = !LI.IsActive; // k.CreatedOn = DateTime.Now; k.ModifiedOn = DateTime.Now; } Dc.SaveChanges(); } } return(1); } catch (Exception ex) { return(0); } }
public static Dictionary <string, object> UpdateIsCancel1(UpdateToCancelData obj) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); var Result1 = Common.Getdata(dbcontext.MultipleResults("[dbo].[Sp_Mandate]"). Execute("@QueryType", "@MandateId", "@UserId", "UpdateIsCancel", Dbsecurity.Decrypt(obj.mandateId), Dbsecurity.Decrypt(obj.UserId))); Result1.Add("result", "1"); return(Result1); } catch (Exception ex) { throw ex; } }
public static bankValidationResponseData bankvalida(BankValidationModal MData) { try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); bankValidationResponseData res = new bankValidationResponseData(); List <IFSCResultModal> IFSCResultModallist = new List <IFSCResultModal>(); List <MICRResultModal> MICRResultModallist = new List <MICRResultModal>(); List <BankNameModal> BankNameModallist = new List <BankNameModal>(); List <MandateDataModal> MandateDataModallist = new List <MandateDataModal>(); List <MandateActivityDataModal> MandateActivityDataModallist = new List <MandateActivityDataModal>(); List <IsLiveInNACHModal> IsLiveInNACHModallist = new List <IsLiveInNACHModal>(); List <EMandateDataModal> EMandateDataModallist = new List <EMandateDataModal>(); List <EMandateTypeDataModal> EMandateTypeDataModallist = new List <EMandateTypeDataModal>(); //ds = CommonManger.FillDatasetWithParam("Sp_Mandate", "@QueryType", "@MandateId", "@UserId", "UpdateIsFirstvalidation", DbSecurity.Decrypt(mandateId), DbSecurity.Decrypt(UserId)); var Result = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <IFSCResultModal>().With <MICRResultModal>().With <MandateDataModal>().With <BankNameModal>().With <MandateActivityDataModal>().With <IsLiveInNACHModal>().With <EMandateDataModal>().With <EMandateTypeDataModal>(). Execute("@QueryType", "@MandateId", "@Appid", "@UserId", "UpdateIsFirstvalidation", Dbsecurity.Decrypt(MData.MandateId), Dbsecurity.Decrypt(MData.AppId), Dbsecurity.Decrypt(MData.UserId)); Result.FirstOrDefault().Cast <IFSCResultModal>().ToList(); res.IFSCResultModallist = Result[0].Cast <IFSCResultModal>().ToList(); //foreach (var Logindata in Result) //{ res.IFSCResultModallist = Result[0].Cast <IFSCResultModal>().ToList(); res.MICRResultModallist = Result[1].Cast <MICRResultModal>().ToList(); res.MandateDataModallist = Result[2].Cast <MandateDataModal>().ToList(); res.BankNameModallist = Result[3].Cast <BankNameModal>().ToList(); res.MandateActivityDataModallist = Result[4].Cast <MandateActivityDataModal>().ToList(); res.IsLiveInNACHModallist = Result[5].Cast <IsLiveInNACHModal>().ToList(); res.EMandateDataModallist = Result[6].Cast <EMandateDataModal>().ToList(); res.EMandateTypeDataModallist = Result[7].Cast <EMandateTypeDataModal>().ToList(); //} return(res); } catch (Exception ex) { return(null); } }
public static DataSet GetMobileNo(string MandateId, string AppID, string EmandateType) { DataSet dsData = new DataSet(); try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <GetMobileNoRes> GetMandateResList = new List <GetMobileNoRes>(); var Result = dbcontext.MultipleResults("[dbo].[sp_ESign]").With <GetMobileNoRes>(). Execute("@QueryType", "@mandateid", "@emandatetype", "@AppId", "GetMobileNo", MandateId, EmandateType, AppID); GetMandateResList = Result[0].Cast <GetMobileNoRes>().ToList(); var tb = new DataTable(typeof(GetMobileNoRes).Name); PropertyInfo[] props = typeof(GetMobileNoRes).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (var prop in props) { tb.Columns.Add(prop.Name, prop.PropertyType); } foreach (var item in GetMandateResList) { var values = new object[props.Length]; for (var i = 0; i < props.Length; i++) { values[i] = props[i].GetValue(item, null); } tb.Rows.Add(values); } dsData.Tables.Add(tb); } catch (Exception ex) { Console.Out.WriteLine("-----------------"); Console.Out.WriteLine(ex.Message); } return(dsData); }
public static byte[] GetRupeeIcon() { DataSet dsData = null; try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <CutterImag> CutterImagList = new List <CutterImag>(); List <ShowData> ShowDataList = new List <ShowData>(); var Result = dbcontext.MultipleResults("[dbo].[Sp_LogoImageData]").With <CutterImag>(). Execute("@QueryType", "GetRupeeIcon"); CutterImagList = Result[0].Cast <CutterImag>().ToList(); return((byte[])CutterImagList[0].ImageData); } catch (Exception ex) { return(null); } }
public IEnumerable <ResponseFlag> ViewCropImage(UploadMandateModel context) { List <ResponseFlag> common = new List <ResponseFlag>(); ResponseFlag Flag = new ResponseFlag(); string ID = Convert.ToString(Dbsecurity.Decrypt(context.MdtID)); string No = Convert.ToString(Dbsecurity.Decrypt(context.RefrenceNo)); string APPId = Convert.ToString(Dbsecurity.Decrypt(context.AppID)); string UserId = Convert.ToString(Dbsecurity.Decrypt(context.UserId)); try { QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <BindGrid> dataList1 = new List <BindGrid>(); var Result2 = dbcontext.MultipleResults("[dbo].[Sp_Mandate]").With <BindGrid>().Execute("@QueryType", "@MandateId", "@AppId", "EditMandate", ID, APPId); Flag.IsPrint = dataList1.Cast <BindGrid>().ToList().Select(x => x.IsPrint).First().ToString(); Flag.IsScan = dataList1.Cast <BindGrid>().ToList().Select(x => x.IsScan).First().ToString(); Flag.Flag = "1"; common.Add(Flag); } catch (Exception ex) { throw ex; } return(common); }
public static DataSet GetData_MandateID(string MandateId, string AppID, string WebAppUrl, string Activity, string UserId) { DataSet dsData = new DataSet(); try { string TempId = AppID + MandateId; TempId = SendEmailAndSMSGlobal.Global.ReverseString(TempId); TempId = SendEmailAndSMSGlobal.Global.CreateRandomCode(6) + TempId; //SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[Convert.ToString(AppID)].ConnectionString); //string query = "Sp_SendEmail"; //SqlCommand cmd = new SqlCommand(query, con); //cmd.CommandType = CommandType.StoredProcedure; //cmd.Parameters.AddWithValue("@QueryType", "GetData_MandateID"); //cmd.Parameters.AddWithValue("@MandateId", MandateId); //cmd.Parameters.AddWithValue("@Activity", Activity); //cmd.Parameters.AddWithValue("@WebAppUrl", WebAppUrl); //cmd.Parameters.AddWithValue("@EncodedMandateID", TempId); //cmd.Parameters.AddWithValue("@UserId", UserId); //SqlDataAdapter da = new SqlDataAdapter(cmd); //DataTable dt = new DataTable(); //da.Fill(dtset); QuickCheck_AngularEntities dbcontext = new QuickCheck_AngularEntities(); List <GetMandateRes> GetMandateResList = new List <GetMandateRes>(); List <SMS_MessageStringRes> SMS_MessageStringResList = new List <SMS_MessageStringRes>(); List <Mail_MessageStringRes> Mail_MessageStringResList = new List <Mail_MessageStringRes>(); List <SubjectHeadRes> SubjectHeadResList = new List <SubjectHeadRes>(); var Result = dbcontext.MultipleResults("[dbo].[Sp_SendEmail]").With <GetMandateRes>().With <SMS_MessageStringRes>().With <Mail_MessageStringRes>().With <SubjectHeadRes>(). Execute("@QueryType", "@MandateId", "@Activity", "@WebAppUrl", "@EncodedMandateID", "@UserId", "@AppId", "@EncodedAppId", "GetData_MandateID", Convert.ToString(MandateId), "ESingle", WebAppUrl, TempId, UserId.ToString(), AppID, Encryptions.Dbsecurity.Encrypt(AppID)); /// return "1"; //string query = "Sp_GetEmailData"; //SqlCommand cmd = new SqlCommand(query, con); //cmd.CommandType = CommandType.StoredProcedure; //cmd.Parameters.AddWithValue("@QueryType", "ShowData"); //cmd.Parameters.AddWithValue("@Id", MandateId); //SqlDataAdapter da = new SqlDataAdapter(cmd); GetMandateResList = Result[0].Cast <GetMandateRes>().ToList(); SMS_MessageStringResList = Result[1].Cast <SMS_MessageStringRes>().ToList(); Mail_MessageStringResList = Result[2].Cast <Mail_MessageStringRes>().ToList(); SubjectHeadResList = Result[3].Cast <SubjectHeadRes>().ToList(); var tb = new DataTable(typeof(GetMandateRes).Name); PropertyInfo[] props = typeof(GetMandateRes).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (var prop in props) { tb.Columns.Add(prop.Name, prop.PropertyType); } foreach (var item in GetMandateResList) { var values = new object[props.Length]; for (var i = 0; i < props.Length; i++) { values[i] = props[i].GetValue(item, null); } tb.Rows.Add(values); } var tbSMS_MessageStringRes = new DataTable(typeof(SMS_MessageStringRes).Name); PropertyInfo[] propsSMS_MessageStringRes = typeof(SMS_MessageStringRes).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (var prop in propsSMS_MessageStringRes) { tbSMS_MessageStringRes.Columns.Add(prop.Name, prop.PropertyType); } foreach (var item in SMS_MessageStringResList) { var values = new object[propsSMS_MessageStringRes.Length]; for (var i = 0; i < propsSMS_MessageStringRes.Length; i++) { values[i] = propsSMS_MessageStringRes[i].GetValue(item, null); } tbSMS_MessageStringRes.Rows.Add(values); } var tbMail_MessageStringResList = new DataTable(typeof(Mail_MessageStringRes).Name); PropertyInfo[] propsMail_MessageStringResList = typeof(Mail_MessageStringRes).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (var prop in propsMail_MessageStringResList) { tbMail_MessageStringResList.Columns.Add(prop.Name, prop.PropertyType); } foreach (var item in Mail_MessageStringResList) { var values = new object[propsMail_MessageStringResList.Length]; for (var i = 0; i < propsMail_MessageStringResList.Length; i++) { values[i] = propsMail_MessageStringResList[i].GetValue(item, null); } tbMail_MessageStringResList.Rows.Add(values); } var tbSubjectHeadResList = new DataTable(typeof(SubjectHeadRes).Name); PropertyInfo[] propsSubjectHeadResList = typeof(SubjectHeadRes).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (var prop in propsSubjectHeadResList) { tbSubjectHeadResList.Columns.Add(prop.Name, prop.PropertyType); } foreach (var item in SubjectHeadResList) { var values = new object[propsSubjectHeadResList.Length]; for (var i = 0; i < propsSubjectHeadResList.Length; i++) { values[i] = propsSubjectHeadResList[i].GetValue(item, null); } tbSubjectHeadResList.Rows.Add(values); } dsData.Tables.Add(tb); dsData.Tables.Add(tbSMS_MessageStringRes); dsData.Tables.Add(tbMail_MessageStringResList); dsData.Tables.Add(tbSubjectHeadResList); } catch (Exception ex) { Console.Out.WriteLine("-----------------"); Console.Out.WriteLine(ex.Message); } return(dsData); }