示例#1
0
        protected void gv_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            BootstrapGridView gv = (BootstrapGridView)sender;

            MasterDataModel.MasterDataDistance item = new MasterDataModel.MasterDataDistance();
            item.TBBM_ID     = Convert.ToInt32(e.Keys[0]);
            item.SPSH_ID     = Convert.ToString(e.Keys[1]);
            item.Distance    = Convert.ToDecimal(e.NewValues["Distance"]);
            item.NormalRate  = Convert.ToDecimal(e.NewValues["NormalRate"]);
            item.SpecialRate = Convert.ToDecimal(e.NewValues["SpecialRate"]);
            item.UpdateBy    = UserProfile.Username;

            string res = MasterDataEntity.EditMasterDataDistance(item);

            gv.JSProperties["cpRes"] = res;

            e.Cancel = true;

            if (res.Contains("Success"))
            {
                gv.CancelEdit();
                gv.DataBind();
            }
        }