protected void gvShippingByWeightAndCountry_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "UpdateShippingByWeightAndCountry")
            {
                int         index = Convert.ToInt32(e.CommandArgument);
                GridViewRow row   = gvShippingByWeightAndCountry.Rows[index];

                HiddenField    hfShippingByWeightAndCountryID = row.FindControl("hfShippingByWeightAndCountryID") as HiddenField;
                DropDownList   ddlShippingMethod           = row.FindControl("ddlShippingMethod") as DropDownList;
                DropDownList   ddlCountry                  = row.FindControl("ddlCountry") as DropDownList;
                DecimalTextBox txtFrom                     = row.FindControl("txtFrom") as DecimalTextBox;
                DecimalTextBox txtTo                       = row.FindControl("txtTo") as DecimalTextBox;
                CheckBox       cbUsePercentage             = row.FindControl("cbUsePercentage") as CheckBox;
                DecimalTextBox txtShippingChargePercentage = row.FindControl("txtShippingChargePercentage") as DecimalTextBox;
                DecimalTextBox txtShippingChargeAmount     = row.FindControl("txtShippingChargeAmount") as DecimalTextBox;

                int shippingByWeightAndCountryID = int.Parse(hfShippingByWeightAndCountryID.Value);
                int shippingMethodID             = int.Parse(ddlShippingMethod.SelectedItem.Value);
                int countryID = int.Parse(ddlCountry.SelectedItem.Value);
                ShippingByWeightAndCountry shippingByWeightAndCountry = ShippingByWeightAndCountryManager.GetByID(shippingByWeightAndCountryID);

                if (shippingByWeightAndCountry != null)
                {
                    ShippingByWeightAndCountryManager.UpdateShippingByWeightAndCountry(shippingByWeightAndCountry.ShippingByWeightAndCountryID,
                                                                                       shippingMethodID, countryID, txtFrom.Value, txtTo.Value, cbUsePercentage.Checked,
                                                                                       txtShippingChargePercentage.Value, txtShippingChargeAmount.Value);
                }

                BindData();
            }
        }
        protected void gvShippingByWeightAndCountry_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int shippingByWeightAndCountryID = (int)gvShippingByWeightAndCountry.DataKeys[e.RowIndex]["ShippingByWeightAndCountryID"];
            ShippingByWeightAndCountry shippingByWeightAndCountry = ShippingByWeightAndCountryManager.GetByID(shippingByWeightAndCountryID);

            if (shippingByWeightAndCountry != null)
            {
                ShippingByWeightAndCountryManager.DeleteShippingByWeightAndCountry(shippingByWeightAndCountry.ShippingByWeightAndCountryID);
                BindData();
            }
        }