示例#1
0
 protected void btn_assetNew_Num_Save_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(txt_assetNew_Number.Text.ToString()))
     {
         objs.AS_AssetCode = txt_assetNew_Number.Text.ToString();
         objs.Pr_type_id   = Convert.ToInt32(ddl_Asset_product_type_ad.SelectedItem.Value);
         objs.Prfk_id      = Convert.ToInt32(ddl_Asset_product_ad.SelectedValue);
         objs.As_CreatedBy = "Ahammed";
         int i = amdb._insert_Asset_Code_info(objs);
         if (i == 1)
         {
             _load_assets_grid();
             ScriptManager.RegisterStartupScript(this, GetType(), "msgbox", "AssetRecinserted();", true);
             txt_assetNew_Number.Text = string.Empty;
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "alert", "AssetCodeUsed();", true);
         }
     }
     else
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "msgbox", "typething();", true);
     }
 }