private void showConv_RegistrationGrid() { List <Conv_Registration> conventionRegistrations = new List <Conv_Registration>(); conventionRegistrations = Conv_RegistrationManager.GetAllConv_Registrations(); foreach (Conv_Registration item in conventionRegistrations) { item.ExtraField5 = "../MembersArea/ConventionPaymentPrint.aspx?Conv_RegistrationID=710307" + item.Conv_RegistrationID + "034438"; item.ExtraField3 = "../MembersArea/ConventionPaymentPrint.aspx?Confirmation=1&Conv_RegistrationID=710307" + item.Conv_RegistrationID + "034438"; } gvConv_Registration.DataSource = conventionRegistrations; gvConv_Registration.DataBind(); }
private void showConv_RegistrationGrid() { List <Conv_Registration> conventionRegistrations = new List <Conv_Registration>(); if (rbtnlPyament.SelectedValue == "3") { conventionRegistrations = Conv_RegistrationManager.GetAllConv_Registrations(); foreach (Conv_Registration item in conventionRegistrations) { item.ExtraField5 = "../MembersArea/ConventionPaymentPrint.aspx?Conv_RegistrationID=710307" + item.Conv_RegistrationID + "034438"; } gvConv_Registration.DataSource = conventionRegistrations; } else if (rbtnlPyament.SelectedValue == "2") { string sql = @" Declare @IsFalse bit Declare @IsTrue bit set @IsFalse=0 set @IsTrue=1 SELECT [Conv_Registration].[Conv_RegistrationID] ,[Conv_Registration].[Conv_ConventionID] ,[Conv_Registration].[Mem_MemberID] ,[Conv_Registration].[RegistrationFee] ,[Conv_Registration].[Lunch1No] ,[Conv_Registration].[Lunch1Amount] ,[Conv_Registration].[Lunch2No] ,[Conv_Registration].[Lunch2Amount] ,[Conv_Registration].[Dinner1] ,[Conv_Registration].[Dinner2] ,[Conv_Registration].[LadiesBag] ,[Conv_Registration].[IEBTie] ,[Conv_Registration].[TotalIEBFee] ,[Conv_Registration].[bKashFees] ,[Conv_Registration].[TotalPayable] ,[Conv_Registration].[TrxID] ,[Conv_Registration].[AddedDate] ,[Conv_Registration].[TypeID] ,[Conv_Registration].[StatusID] ,[Conv_Registration].[ExtraField1] ,[Conv_Registration].[ExtraField2] ,[Conv_Registration].[ExtraField3] ,Mem_Member.MemberShipNo as [ExtraField4] ,[Conv_Registration].[ExtraField5] FROM [Conv_Registration] inner join Mem_Member on Mem_Member.Mem_MemberID = Conv_Registration.Mem_MemberID where TrxID='' and StatusID<>3 order by [Conv_Registration].AddedDate desc "; DataSet ds = DatabaseManager.ExecSQL(sql); foreach (DataRow dr in ds.Tables[0].Rows) { dr["ExtraField5"] = "../MembersArea/ConventionPaymentPrint.aspx?Conv_RegistrationID=710307" + dr["Conv_RegistrationID"].ToString() + "034438"; } gvConv_Registration.DataSource = ds.Tables[0]; //conventionRegistrations = Conv_RegistrationManager.GetAllConv_Registrations().FindAll(x => x.TrxID == ""); } else if (rbtnlPyament.SelectedValue == "1") { string sql = @" Declare @IsFalse bit Declare @IsTrue bit set @IsFalse=0 set @IsTrue=1 SELECT [Conv_Registration].[Conv_RegistrationID] ,[Conv_Registration].[Conv_ConventionID] ,[Conv_Registration].[Mem_MemberID] ,[Conv_Registration].[RegistrationFee] ,[Conv_Registration].[Lunch1No] ,Lunch1E=(CASE [Conv_Registration].[Lunch1No] WHEN 0 THEN @IsFalse ELSE @IsTrue END) ,[Conv_Registration].[Lunch1Amount] ,[Conv_Registration].[Lunch2No] ,Lunch2E=(CASE [Conv_Registration].[Lunch2No] WHEN 0 THEN @IsFalse ELSE @IsTrue END) ,[Conv_Registration].[Lunch2Amount] ,[Conv_Registration].[Dinner1]/500 as Dinner1 ,Dinner1E=(CASE ([Conv_Registration].[Dinner1]/500) WHEN 0 THEN @IsFalse ELSE @IsTrue END) ,[Conv_Registration].[Dinner2]/800 as Dinner2 ,Dinner2E=(CASE ([Conv_Registration].[Dinner2]/500) WHEN 0 THEN @IsFalse ELSE @IsTrue END) ,[Conv_Registration].[LadiesBag]/1200 as LadiesBag ,LadiesBagE=(CASE ([Conv_Registration].[LadiesBag]/500) WHEN 0 THEN @IsFalse ELSE @IsTrue END) ,[Conv_Registration].[IEBTie]/500 as IEBTie ,IEBTieE=(CASE ([Conv_Registration].[IEBTie]/500) WHEN 0 THEN @IsFalse ELSE @IsTrue END) ,[Conv_Registration].[TotalIEBFee] ,[Conv_Registration].[bKashFees] ,[Conv_Registration].[TotalPayable] ,[Conv_Registration].[TrxID] ,[Conv_Registration].[AddedDate] ,[Conv_Registration].[TypeID] ,[Conv_Registration].[StatusID] ,[Conv_Registration].[ExtraField1] ,[Conv_Registration].[ExtraField2] ,[Conv_Registration].[ExtraField3] ,Mem_Member.MemberShipNo as [ExtraField4] ,[Conv_Registration].[ExtraField5] ,'' as PictureUrl FROM [Conv_Registration] inner join Mem_Member on Mem_Member.Mem_MemberID = Conv_Registration.Mem_MemberID where TrxID <>'' and StatusID<>3 and Mem_Member.Mem_MemberID=" + Request.QueryString["Mem_MemberID"] + @" order by [Conv_Registration].AddedDate desc "; DataSet ds = DatabaseManager.ExecSQL(sql); foreach (DataRow dr in ds.Tables[0].Rows) { dr["ExtraField5"] = "../MembersArea/ConventionPaymentPrint.aspx?Conv_RegistrationID=710307" + dr["Conv_RegistrationID"].ToString() + "034438"; dr["PictureUrl"] = "../MembersArea/MemberPicture/" + dr["ExtraField4"].ToString().Split('/')[0] + "-" + dr["ExtraField4"].ToString().Split('/')[1] + ".jpg"; } gvConv_Registration.DataSource = ds.Tables[0]; } gvConv_Registration.DataBind(); }
private void showConv_RegistrationGrid() { decimal total = 0; decimal totalbKash = 0; List <Conv_Registration> conventionRegistrations = new List <Conv_Registration>(); if (rbtnlPyament.SelectedValue == "3") { conventionRegistrations = Conv_RegistrationManager.GetAllConv_Registrations(); foreach (Conv_Registration item in conventionRegistrations) { item.ExtraField5 = "../MembersArea/ConventionPaymentPrint.aspx?Conv_RegistrationID=710307" + item.Conv_RegistrationID + "034438"; } return; gvConv_Registration.DataSource = conventionRegistrations; } else if (rbtnlPyament.SelectedValue == "2") { string sql = @"SELECT [Conv_Registration].[Conv_RegistrationID] ,[Conv_Registration].[Conv_ConventionID] ,[Conv_Registration].[Mem_MemberID] ,[Conv_Registration].[RegistrationFee] ,[Conv_Registration].[Lunch1No] ,[Conv_Registration].[Lunch1Amount] ,[Conv_Registration].[Lunch2No] ,[Conv_Registration].[Lunch2Amount] ,[Conv_Registration].[Dinner1] ,[Conv_Registration].[Dinner2] ,[Conv_Registration].[LadiesBag] ,[Conv_Registration].[IEBTie] ,[Conv_Registration].[TotalIEBFee] ,[Conv_Registration].[bKashFees] ,[Conv_Registration].[TotalPayable] ,[Conv_Registration].[TrxID] ,[Conv_Registration].[AddedDate] ,[Conv_Registration].[TypeID] ,[Conv_Registration].[StatusID] ,[Conv_Registration].[ExtraField1] ,[Conv_Registration].[ExtraField2] ,[Conv_Registration].[ExtraField3] ,Mem_Member.MemberShipNo as [ExtraField4] ,[Conv_Registration].[ExtraField5] ,Mem_Member.Mobile FROM [Conv_Registration] inner join Mem_Member on Mem_Member.Mem_MemberID = Conv_Registration.Mem_MemberID where TrxID='' order by [Conv_Registration].AddedDate desc "; DataSet ds = DatabaseManager.ExecSQL(sql); foreach (DataRow dr in ds.Tables[0].Rows) { dr["ExtraField5"] = "../MembersArea/ConventionPaymentPrint.aspx?Conv_RegistrationID=710307" + dr["Conv_RegistrationID"].ToString() + "034438"; } gvConv_Registration.DataSource = ds.Tables[0]; //conventionRegistrations = Conv_RegistrationManager.GetAllConv_Registrations().FindAll(x => x.TrxID == ""); } else if (rbtnlPyament.SelectedValue == "1") { string sql = @"SELECT [Conv_Registration].[Conv_RegistrationID] ,[Conv_Registration].[Conv_ConventionID] ,[Conv_Registration].[Mem_MemberID] ,[Conv_Registration].[RegistrationFee] ,[Conv_Registration].[Lunch1No] ,[Conv_Registration].[Lunch1Amount] ,[Conv_Registration].[Lunch2No] ,[Conv_Registration].[Lunch2Amount] ,[Conv_Registration].[Dinner1] ,[Conv_Registration].[Dinner2] ,[Conv_Registration].[LadiesBag] ,[Conv_Registration].[IEBTie] ,[Conv_Registration].[TotalIEBFee] ,[Conv_Registration].[bKashFees] ,[Conv_Registration].[TotalPayable] ,[Conv_Registration].[TrxID] ,[Conv_Registration].[AddedDate] ,[Conv_Registration].[TypeID] ,[Conv_Registration].[StatusID] ,[Conv_Registration].[ExtraField1] ,[Conv_Registration].[ExtraField2] ,[Conv_Registration].[ExtraField3] ,Mem_Member.MemberShipNo as [ExtraField4] ,[Conv_Registration].[ExtraField5] ,Mem_Member.Mobile FROM [Conv_Registration] inner join Mem_Member on Mem_Member.Mem_MemberID = Conv_Registration.Mem_MemberID where TrxID <>'' order by [Conv_Registration].AddedDate desc "; DataSet ds = DatabaseManager.ExecSQL(sql); foreach (DataRow dr in ds.Tables[0].Rows) { total += decimal.Parse(dr["TotalIEBFee"].ToString()); totalbKash += decimal.Parse(dr["TotalPayable"].ToString()); dr["ExtraField5"] = "../MembersArea/ConventionPaymentPrint.aspx?Conv_RegistrationID=710307" + dr["Conv_RegistrationID"].ToString() + "034438"; } gvConv_Registration.DataSource = ds.Tables[0]; } gvConv_Registration.DataBind(); ((Label)gvConv_Registration.FooterRow.FindControl("lblTotalFooter")).Text = total.ToString("0,0") + "+" + (totalbKash - total).ToString("0,0") + "=" + totalbKash.ToString("0,0"); }