বুধবার, ২৪ এপ্রিল, ২০২৪

Privacy Policy for Sonali Life - Agency

 Privacy Policy

This privacy policy applies to the Sonali Life - Agency app (hereby referred to as "Application") for mobile devices that was created by Sonali Life Insurance (hereby referred to as "Service Provider") as a Free service. This service is intended for use "AS IS".


Information Collection and Use

The Application collects information when you download and use it. This information may include information such as

  • Your device's Internet Protocol address (e.g. IP address)
  • The pages of the Application that you visit, the time and date of your visit, the time spent on those pages
  • The time spent on the Application
  • The operating system you use on your mobile device


The Application does not gather precise information about the location of your mobile device.


The Service Provider may use the information you provided to contact you from time to time to provide you with important information, required notices and marketing promotions.


For a better experience, while using the Application, the Service Provider may require you to provide us with certain personally identifiable information, including but not limited to male. The information that the Service Provider request will be retained by them and used as described in this privacy policy.


Third Party Access

Only aggregated, anonymized data is periodically transmitted to external services to aid the Service Provider in improving the Application and their service. The Service Provider may share your information with third parties in the ways that are described in this privacy statement.


Please note that the Application utilizes third-party services that have their own Privacy Policy about handling data. Below are the links to the Privacy Policy of the third-party service providers used by the Application:


The Service Provider may disclose User Provided and Automatically Collected Information:

  • as required by law, such as to comply with a subpoena, or similar legal process;
  • when they believe in good faith that disclosure is necessary to protect their rights, protect your safety or the safety of others, investigate fraud, or respond to a government request;
  • with their trusted services providers who work on their behalf, do not have an independent use of the information we disclose to them, and have agreed to adhere to the rules set forth in this privacy statement.


Opt-Out Rights

You can stop all collection of information by the Application easily by uninstalling it. You may use the standard uninstall processes as may be available as part of your mobile device or via the mobile application marketplace or network.


Data Retention Policy

The Service Provider will retain User Provided data for as long as you use the Application and for a reasonable time thereafter. If you'd like them to delete User Provided Data that you have provided via the Application, please contact them at shehmaz@sonalilife.com and they will respond in a reasonable time.


Children

The Service Provider does not use the Application to knowingly solicit data from or market to children under the age of 13.


The Application does not address anyone under the age of 13. The Service Provider does not knowingly collect personally identifiable information from children under 13 years of age. In the case the Service Provider discover that a child under 13 has provided personal information, the Service Provider will immediately delete this from their servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact the Service Provider (shehmaz@sonalilife.com) so that they will be able to take the necessary actions.


Security

The Service Provider is concerned about safeguarding the confidentiality of your information. The Service Provider provides physical, electronic, and procedural safeguards to protect information the Service Provider processes and maintains.


Changes

This Privacy Policy may be updated from time to time for any reason. The Service Provider will notify you of any changes to the Privacy Policy by updating this page with the new Privacy Policy. You are advised to consult this Privacy Policy regularly for any changes, as continued use is deemed approval of all changes.


This privacy policy is effective as of 2024-04-25


Your Consent

By using the Application, you are consenting to the processing of your information as set forth in this Privacy Policy now and as amended by us.


Contact Us

If you have any questions regarding privacy while using the Application, or have questions about the practices, please contact the Service Provider via email at shehmaz@sonalilife.com.


This privacy policy page was generated by App Privacy Policy Generator

বৃহস্পতিবার, ১৪ অক্টোবর, ২০২১

sql Row to column

 DECLARE  @pvt TABLE(Present int, [Absent] int);

INSERT INTO @pvt VALUES (10,40);


--Unpivot the table.

SELECT Code, Value

FROM 

   (SELECT Present, Absent   FROM @pvt) p UNPIVOT

   (Value FOR Code IN (Present, [Absent]) )AS unpvt;


রবিবার, ১১ জানুয়ারী, ২০১৫

Dse Live crop from dsebd.org

<div id="frameContainer" style="overflow: hidden; width: 557px; margin-left: 209px; margin-top: -1px;">
<iframe src="http://www.dsebd.org/" scrolling="no" style="width: 721px; height: 114px; margin-top: -70px; margin-left: -181px; padding-left: 0px;"></iframe>
</div>

শনিবার, ৫ এপ্রিল, ২০১৪

Multi row in single column in Sql

query
SELECT  distinct   CONVERT(varchar,EntryDate,103)EntryDate,
    mt.VoucherNo,sum(mt.DAmount)Amt,mt.AccStatement,
    STUFF((SELECT ', ' +(select AccChart.ActName from AccChart where CONVERT(nvarchar(50),AccChart.ActCode)= t2.ActCode) FROM AccGl2014 t2
   WHERE t2.VoucherNo = mt.VoucherNo FOR XML PATH (''))  ,1,2,'')  as AccountName  ,STUFF((SELECT ', ' + t3.Descrp  FROM AccGl2014 t3
     WHERE t3.VoucherNo = mt.VoucherNo FOR XML PATH (''))  ,1,2,'')  as Descrp              
    FROM     dbo.AccGl2014 mt where (mt.AccStatement='JV' or mt.AccStatement='Cash' or mt.AccStatement='Bank' ) and mt.EntryDate
    between '04/01/2014' and '04/05/2014'   group by mt.VoucherNo,mt.EntryDate,mt.AccStatement order by mt.VoucherNo desc


normal code

মঙ্গলবার, ২৫ মার্চ, ২০১৪

Tab control in asp



aspx code:

<asp:Panel ID="PanelMain" HorizontalAlign="Left" runat="server" Width="900px" GroupingText="Accounts Report Controller">

            <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" Width="900px"
                ActiveTabIndex="2">

                <ajaxToolkit:TabPanel ID="TabPanel1" runat="server">
                    <headertemplate>Accounts:</headertemplate>
                    <contenttemplate><asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><table align="center" style="width: 850px"><tr><td align="left" class="auto-style3"></td><td align="left"><asp:Label ID="Label2" runat="server" CssClass="labelFont" Font-Bold="true" Font-Size="12px"></asp:Label></td></tr><tr id="TrAcc" visible="false" runat="server"><td id="td1" align="right" class="auto-style3"><asp:Label ID="Label3" runat="server" CssClass="labelFont" Text="Date From:" Font-Bold="true" Font-Size="12px"></asp:Label></td><td id="td2"><asp:TextBox ID="txtDateFrom2" runat="server"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator2"
                    runat="server" ControlToValidate="txtDateFrom2" ErrorMessage="*"
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator><ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server"
                    Format="dd/MM/yyyy" TargetControlID="txtDateFrom2"></ajaxToolkit:CalendarExtender><ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server"
                    AcceptNegative="None" DisplayMoney="Left" ErrorTooltipEnabled="True"
                    Mask="99/99/9999" MaskType="Date" MessageValidatorTip="true"
                    OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                    TargetControlID="txtDateFrom2"></ajaxToolkit:MaskedEditExtender></td></tr><tr id="Tr2" visible="false" runat="server"><td align="right" class="auto-style3">Date To: </td><td><asp:TextBox ID="txtDateToAcc" runat="server"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator4"
                    runat="server" ControlToValidate="txtDateToAcc" ErrorMessage="*"
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator><ajaxToolkit:CalendarExtender ID="CalendarExtender3" runat="server"
                    Format="dd/MM/yyyy" TargetControlID="txtDateToAcc"></ajaxToolkit:CalendarExtender><ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender3" runat="server"
                    AcceptNegative="None" DisplayMoney="Left" ErrorTooltipEnabled="True"
                    Mask="99/99/9999" MaskType="Date" MessageValidatorTip="true"
                    OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                    TargetControlID="txtDateToAcc" /></td></tr><tr class="rowCss"><td colspan="2" align="left">
                        <asp:RadioButtonList ID="RadioButtonListAcc" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rdbListGen_SelectedIndexChanged"
                                                Width="100%"><asp:ListItem Text="Account List" Value="4"></asp:ListItem><asp:ListItem Text="Account List Summary" Value="5">

                     </asp:ListItem></asp:RadioButtonList></td></tr><tr><td align="left" class="auto-style3"></td>
                         <td align="center">
                         <asp:Button ID="BtnAcc" runat="server" Text="View" CssClass="button" OnClick="BtnAcc_Click" /></td></tr></table>

                        </ContentTemplate>
                        <Triggers><asp:PostBackTrigger ControlID="BtnAcc" />

                        </Triggers>
                                     </asp:UpdatePanel>
                    </contenttemplate>
                </ajaxToolkit:TabPanel>

                <ajaxToolkit:TabPanel ID="TabPanelGeneral" runat="server">
                    <headertemplate>Balance Sheet:</headertemplate>
                    <contenttemplate><asp:UpdatePanel ID="Up1" runat="server"><ContentTemplate><table align="center" style="width: 850px"><tr><td align="left" class="auto-style3"></td><td align="left"><asp:Label ID="lblError" runat="server" CssClass="labelFont" Font-Bold="true" Font-Size="12px"></asp:Label></td></tr><tr id="TrDf" visible="false" runat="server"><td id="tdradio2" align="right" class="auto-style3"><asp:Label ID="Label1" runat="server" CssClass="labelFont" Text="Date From:" Font-Bold="true" Font-Size="12px"></asp:Label></td><td id="tdradio3"><asp:TextBox ID="txtDateFrom" runat="server"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator3"
                    runat="server" ControlToValidate="txtDateFrom" ErrorMessage="*"
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator><ajaxToolkit:CalendarExtender ID="CalendarExtenderCd" runat="server"
                    Format="dd/MM/yyyy" TargetControlID="txtDateFrom"></ajaxToolkit:CalendarExtender><ajaxToolkit:MaskedEditExtender ID="MaskedEditExtenderCD" runat="server"
                    AcceptNegative="None" DisplayMoney="Left" ErrorTooltipEnabled="True"
                    Mask="99/99/9999" MaskType="Date" MessageValidatorTip="true"
                    OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                    TargetControlID="txtDateFrom" /></td></tr><tr id="TrDt" visible="false" runat="server"><td align="right" class="auto-style3">Date To: </td><td><asp:TextBox ID="txtDateTo" runat="server"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator1"
                    runat="server" ControlToValidate="txtDateTo" ErrorMessage="*"
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator><ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server"
                    Format="dd/MM/yyyy" TargetControlID="txtDateTo"></ajaxToolkit:CalendarExtender><ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server"
                    AcceptNegative="None" DisplayMoney="Left" ErrorTooltipEnabled="True"
                    Mask="99/99/9999" MaskType="Date" MessageValidatorTip="true"
                    OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                    TargetControlID="txtDateTo" /></td></tr><tr><td id="tdradio" colspan="2" align="left"><asp:RadioButtonList ID="rdbListGen" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rdbListGen_SelectedIndexChanged"
                                                Width="100%"><asp:ListItem Text="Balance Sheet" Value="1"></asp:ListItem><asp:ListItem Text="WS Stock Report(Item Wise)" Value="2"></asp:ListItem></asp:RadioButtonList></td></tr><tr><td align="left" class="auto-style3"></td><td align="center"><asp:Button ID="btnGeneral" runat="server" Text="View" CssClass="button" OnClick="btnGeneral_Click" /></td></tr></table></ContentTemplate><Triggers><asp:PostBackTrigger ControlID="btnGeneral" /></Triggers></asp:UpdatePanel></contenttemplate>
                </ajaxToolkit:TabPanel>


                <ajaxToolkit:TabPanel ID="TabPanelPl" runat="server">
                    <headertemplate>Profit &amp; Loss:</headertemplate>
                    <contenttemplate>
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                            <ContentTemplate><table align="center" style="width: 850px">
                        <tr id="TrplDt" visible="true" runat="server">
                            <td align="left" class="auto-style3"></td>
                            <td align="left">
                                <asp:Label ID="Label4" runat="server" CssClass="labelFont" Font-Bold="true" Font-Size="12px"></asp:Label>
                            </td></tr><tr id="Tr1" visible="true" runat="server">
                                          <td id="td3" align="right" class="auto-style3">
                                              <asp:Label ID="Label5" runat="server" CssClass="labelFont" Text="Date From:" Font-Bold="true" Font-Size="12px"></asp:Label>
                                          </td><td id="td4"><asp:TextBox ID="dfTextBoxPl" runat="server"></asp:TextBox>
                                              <asp:RegularExpressionValidator ID="RegularExpressionValidator5"
                    runat="server" ControlToValidate="dfTextBoxPl" ErrorMessage="*"
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator><ajaxToolkit:CalendarExtender ID="CalendarExtender4" runat="server"
                    Format="dd/MM/yyyy" TargetControlID="dfTextBoxPl"></ajaxToolkit:CalendarExtender><%--<ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender4" runat="server"
                    AcceptNegative="None" DisplayMoney="Left" ErrorTooltipEnabled="True"
                    Mask="99/99/9999" MaskType="Date" MessageValidatorTip="true"
                    OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                    TargetControlID="dfTextBoxPl"></ajaxToolkit:MaskedEditExtender>--%></td>
                                      </tr>
                   
                    <tr id="Tr4" visible="true" runat="server"><td align="right" class="auto-style3">Date To: </td>
                        <td>
                            <asp:TextBox ID="dtTextBoxPL" runat="server">
                               
                            </asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator7"
                    runat="server" ControlToValidate="dtTextBoxPL" ErrorMessage="*"
                    ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"></asp:RegularExpressionValidator>
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender6" runat="server"  Format="dd/MM/yyyy" TargetControlID="dtTextBoxPL">
                       </ajaxToolkit:CalendarExtender><%--<ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender6" runat="server"
                    AcceptNegative="None" DisplayMoney="Left" ErrorTooltipEnabled="True"
                    Mask="99/99/9999" MaskType="Date" MessageValidatorTip="true"
                    OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                    TargetControlID="dtTextBoxPL" />--%>
                                                                                                                   </td></tr>
                        <tr class="rowCss"><td colspan="2" align="left">
                     
                            <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rdbListGen_SelectedIndexChanged" Width="100%">
                                <asp:ListItem Text="P&L (Date Range)" Value="7"></asp:ListItem>
                                <asp:ListItem Text="P&L (Date Range) Year on Year " Value="8"></asp:ListItem>
                                <asp:ListItem Text=" P&L" Value="9"></asp:ListItem>

                            </asp:RadioButtonList>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   </td></tr><tr><td align="left" class="auto-style3"></td><td align="center"><asp:Button ID="ButtonPl" runat="server" Text="View" CssClass="button" OnClick="BtnPl_Click" /></td></tr></table>
                                                                                       </ContentTemplate><Triggers><asp:PostBackTrigger ControlID="ButtonPl" /></Triggers>
                                     </asp:UpdatePanel>
                    </contenttemplate>
                </ajaxToolkit:TabPanel>

                <ajaxToolkit:TabPanel ID="TabPanelCashFlow" runat="server">
                    <headertemplate>Cash Flow:</headertemplate>
                    <contenttemplate><asp:UpdatePanel runat="server" ID="UpdatePanel2"><ContentTemplate></ContentTemplate></asp:UpdatePanel></contenttemplate>
                </ajaxToolkit:TabPanel>

            </ajaxToolkit:TabContainer>
        </asp:Panel>

শনিবার, ১ ফেব্রুয়ারী, ২০১৪

Gridview Code in asp.net with ConboBox,TextBov And Button

Code in aspx:

 <asp:GridView ID="GridView1" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="100%" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnRowDataBound="GridView1_RowDataBound1" SelectedIndex="0" CellPadding="0" ForeColor="Black" GridLines="None">
                                    <HeaderStyle CssClass="HeaderCSS" BackColor="#CCCCCC" Font-Bold="True" ForeColor="Black" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                    <RowStyle ForeColor="#333333" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                    <%-- BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center"--%>
                                    <Columns>

                                        <asp:TemplateField HeaderStyle-CssClass="gridViewHeader" HeaderText="Account Name-Code" ItemStyle-CssClass="ItemStyle">
                                            <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                            <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                            <ItemTemplate>
                                                <asp:DropDownList ID="gvDdlAccountName" CssClass="ddlCSS" runat="server" DataField="ActName" Width="197px" AutoPostBack="False">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <%-- <HeaderStyle CssClass="gridViewHeader" />--%>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderStyle-CssClass="gridViewHeader" HeaderText="  Debit" ItemStyle-CssClass="ItemStyle">
                                            <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                            <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                            <ItemTemplate>
                                                <asp:TextBox ID="debitTxt" DataField="Debit" runat="server" CssClass="txtCssDr" Width="180px"></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle CssClass="gridViewHeader" />
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderStyle-CssClass="gridViewHeader" HeaderText="  Credit" ItemStyle-CssClass="ItemStyle">
                                            <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                            <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                                            <ItemTemplate>
                                                <asp:TextBox ID="creditTxt" runat="server" DataField="Credit" Width="180px" CssClass="txtCssCr"></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle CssClass="gridViewHeader" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="gridViewHeader" HeaderText="Action" ItemStyle-CssClass="cssAction">
                                            <ItemTemplate>
                                                <asp:Button ID="btnAdd" runat="server" Text="Add" Width="85px" OnClick="btnAdd_Click" UseSubmitBehavior="False" />
                                            </ItemTemplate>
                                            <HeaderStyle CssClass="gridViewHeader" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                </asp:GridView>

C# Code:

  protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
        {
            try
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {

                    DropDownList gvDdlAccountName = (DropDownList)e.Row.FindControl("gvDdlAccountName");
                    TextBox debitTextBox = (TextBox)e.Row.FindControl("debitTxt");
                    TextBox creditTxtBox = (TextBox)e.Row.FindControl("creditTxt");
                    Button btn = (Button)e.Row.FindControl("btnAdd");
                    string ab = "";
                    if (gvDdlAccountName != null )
                    {
                        gvDdlAccountName.DataSource =(DataTable) Session["AllAccount"];

                         ab =((DataRowView) e.Row.DataItem)[2].ToString();
                        if(ab!="")
                        gvDdlAccountName.SelectedValue = ab;
                        gvDdlAccountName.DataTextField = "ActName";
                        gvDdlAccountName.DataValueField = "ActCode";
                        gvDdlAccountName.DataBind();
                    }
                    if (debitTextBox != null)
                    {
                        debitTextBox.Text = String.Format("{0:0.00}", ((DataRowView)e.Row.DataItem)[4]);
                        if(debitTextBox.Text!="")
                        totalDebit += Convert.ToDouble(debitTextBox.Text);
                    }
                    if (creditTxtBox != null)
                    {
                        creditTxtBox.Text = String.Format("{0:0.00}", ((DataRowView)e.Row.DataItem)[5]);
                        if (creditTxtBox.Text != "")
                        totalCredit += Convert.ToDouble(creditTxtBox.Text);
                    }
                    if (ab != "")
                    {
                        btn.Text = "Delete";
                        btn.CommandArgument = ((DataRowView)e.Row.DataItem)[0].ToString();
                    }
                }
            }
            catch (Exception exp)
            {
                Show(exp.Message);
            }
        }


   protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                string comm = ((Button) sender).CommandArgument;
                if (comm == "")
                {
                    String user = HttpContext.Current.User.Identity.Name;
                    DropDownList gvDdlAccountName =
                        (DropDownList) GridView1.Rows[GridView1.SelectedIndex].FindControl("gvDdlAccountName");
                    TextBox debitTextBox = (TextBox) GridView1.Rows[GridView1.SelectedIndex].FindControl("debitTxt");
                    TextBox creditTxtBox = (TextBox) GridView1.Rows[GridView1.SelectedIndex].FindControl("creditTxt");

                    if (txtDate.Text.Trim() == "")
                    {
                        Show("Please insert date");
                        return;
                    }

                    double debit = 0;
                    double credit = 0;
                    if (debitTextBox.Text.Trim() != "")
                        debit = Convert.ToDouble(debitTextBox.Text.Trim());
                    if (creditTxtBox.Text.Trim() != "")
                        credit = Convert.ToDouble(creditTxtBox.Text.Trim());
                    if (debit == 0 || credit == 0)
                    {
                        AccTransectionInfo ati = new AccTransectionInfo
                        {
                            ActCode = gvDdlAccountName.SelectedValue.Trim(),
                            ActName = gvDdlAccountName.SelectedItem.Text.Trim().Split('-')[0],
                            Debit = debit,
                            Credit = credit,
                            EntryBy = user,
                            Comments = txtComment.Text.Trim()
                        };
                        u.CommonSqlExecutionBool(
                            "INSERT INTO [dbo].[AccTransTemp]([EntryBy] ,[ActCode],[ActName],[Debit],[Credit],[Comments])" +
                            " VALUES ( '" + ati.EntryBy + "','" + ati.ActCode + "','" + ati.ActName + "','" + ati.Debit +
                            "' ,'" +
                            ati.Credit + "','" + ati.Comments + "') ");


                        FillGrid();
                        ClearPage();

                    }
                    else
                    {
                        Show("Debit Or Credit Must be 0.");
                    }
                }
                else
                {
                    
                    u.CommonSqlExecutionBool("DELETE FROM AccTransTemp WHERE Sl='" + comm + "'");
                    FillGrid();
                }
            }
            catch (Exception ex)
            {

                Show(ex.Message.ToString());
            }

        }

Gridview Code in asp.net with update And link url

  <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                        Width="100%" AllowPaging="True" DataKeyNames="VoucherNo"
                        OnPageIndexChanging="GridView1_PageIndexChanging"
                        OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating"
                        OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound" PageSize="7" OnRowCommand="GridView1_RowCommand">
                        <Columns>
                            <asp:CommandField ShowEditButton="True" HeaderText="Edit">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />

                            </asp:CommandField>

                            <asp:ButtonField HeaderText="View" Text="View" CommandName="VoucherNo" SortExpression="VoucherNo">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center" Width="40px" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                            </asp:ButtonField>

                            <asp:BoundField DataField="EntryDate" HeaderText="Date" ReadOnly="True" DataFormatString="{0:d}">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="AccountName" HeaderText="Account Name" DataFormatString="{0:0.00}" ReadOnly="True">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylCenter" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Left" />
                            </asp:BoundField>
                            <%--  <asp:BoundField DataField="ToAcc" HeaderText="To Account" ReadOnly="True">
                                                    <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylCenter"  />
                                                    <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Right" />
                                                </asp:BoundField>--%>
                            <asp:BoundField DataField="DAmount" HeaderText="Debit" ReadOnly="True" DataFormatString="{0:0.00}">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylRight" Width="100px" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylRight" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CAmount" HeaderText="Credit" ReadOnly="True" DataFormatString="{0:0.00}">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylRight" Width="100px" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylRight" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Balance" HeaderText="Balance" ReadOnly="True" DataFormatString="{0:0.00}">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylRight" Width="100px" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CssClass="HeaderStylRight" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Descrp" HeaderText="Comments">
                                <HeaderStyle BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center" />
                                <ItemStyle BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" />
                            </asp:BoundField>

                        </Columns>
                    </asp:GridView>

C# code:

 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "VoucherNo")
            {
                string nov = ((GridView) e.CommandSource).DataKeys[1].Value.ToString();
                Session["nov"] = nov;
                Response.Write("<script> window.open('ViewJournalDetailsUI.aspx','_blank')</script>");
            }

        }

    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            try
            {
                GridViewRow rowIndex = GridView1.Rows[e.RowIndex];
                string vno = GridView1.DataKeys[e.RowIndex].Values["VoucherNo"].ToString();
                string comment = ((TextBox)(rowIndex.Cells[7].Controls[0])).Text;
                comment = comment.Replace("'", "''");
                if (UpdateData(vno, comment))
                {
                    Show("Updated");
                    GridView1.EditIndex = -1;
                }
                else
                {
                    Show("Error Updating");
                }
                FillGrid();

            }
            catch (Exception ex)
            {
                Show(ex.Message.ToString());
            }
        }