Exemple #1
0
        protected void FV_ShopWatch_ItemInserting(object sender, FormViewInsertEventArgs e)
        {
            TextBox wf_baoHiem         = (TextBox)FV_ShopWatch.FindControl("wf_baoHiem");
            TextBox wf_baoHanh         = (TextBox)FV_ShopWatch.FindControl("wf_baoHanh");
            TextBox wf_thamDinh        = (TextBox)FV_ShopWatch.FindControl("wf_thamDinh");
            TextBox wf_giaoHang        = (TextBox)FV_ShopWatch.FindControl("wf_giaoHang");
            TextBox wf_thoiGianBaoHanh = (TextBox)FV_ShopWatch.FindControl("wf_thoiGianBaoHanh");

            try
            {
                ShopWatch sw = new ShopWatch(
                    -1
                    , wf_baoHiem.Text.Trim()
                    , int.Parse(wf_baoHanh.Text.Trim())
                    , wf_thamDinh.Text.Trim()
                    , wf_giaoHang.Text.Trim()
                    , wf_thoiGianBaoHanh.Text.Trim()
                    );
                if (b.InsertShopWatch(sw))
                {
                    bigTopConnerAlert("Đã cập nhật thành công");
                    FV_ShopWatch.ChangeMode(FormViewMode.ReadOnly);
                    this.fetchDataToShopWatchFormView();
                }
            }
            catch (Exception ex)
            {
                this.errorAlert(ex.Message);
            }
        }
Exemple #2
0
 public bool UpdateShopWatch(ShopWatch _sw)
 {
     try
     {
         return(dal.UpdateShopWatch(_sw));
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }