Beispiel #1
0
 /// <summary>
 /// used to insert the products types
 /// </summary>
 /// <param name="mso_products"></param>
 /// <returns></returns>
 public int _insert_product_type_info(MySqlAsmObjs mso_products)
 {
     try
     {
         int result = 0;
         {
             MySqlCommand cmd = new MySqlCommand("pro_insert_product_type_info", acon);
             cmd.CommandType = CommandType.StoredProcedure;
             cmd.Parameters.Add(new MySqlParameter("@type_name", mso_products.Pr_type_Name));
             cmd.Parameters.Add(new MySqlParameter("@type_SH_name", mso_products.Pr_type_SH_name));
             cmd.Parameters.Add(new MySqlParameter("@pro_id", mso_products.Prfk_id));
             cmd.Parameters.Add(new MySqlParameter("@creby", mso_products.Pr_type_created_by));
             acon.Open();
             result = cmd.ExecuteNonQuery();
             acon.Close();
         }
         return(result);
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         acon.Close();
     }
 }
Beispiel #2
0
 /// <summary>
 /// used to insert the 4 fileds in the brands table
 /// </summary>
 /// <param name="mso_products"></param>
 /// <returns></returns>
 public int _insert_brands_info(MySqlAsmObjs mso_products)
 {
     try
     {
         int result = 0;
         {
             MySqlCommand cmd = new MySqlCommand("pro_insert_brand_info", acon);
             cmd.CommandType = CommandType.StoredProcedure;
             cmd.Parameters.Add(new MySqlParameter("@br_name1", mso_products.Br_name));
             cmd.Parameters.Add(new MySqlParameter("@br_pr_id1", mso_products.Pr_id));
             cmd.Parameters.Add(new MySqlParameter("@br_prt_id1", mso_products.Prfk_id));
             cmd.Parameters.Add(new MySqlParameter("@br_createdBy1", mso_products.Br_createdtime));
             acon.Open();
             result = cmd.ExecuteNonQuery();
             acon.Close();
         }
         return(result);
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         acon.Close();
     }
 }
Beispiel #3
0
        /// <summary>
        /// to insert the cartrige model
        /// </summary>
        /// <param name="mso_products"></param>
        /// <returns></returns>

        public int _insert_asset_cartridge(MySqlAsmObjs mso_products)
        {
            try
            {
                int result = 0;
                {
                    MySqlCommand cmd = new MySqlCommand("pro_insert_asset_cartridge", acon);
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new MySqlParameter("@Catri_Model1", mso_products.Cat_Model));
                    cmd.Parameters.Add(new MySqlParameter("@catri_createdby1", mso_products.Cat_AssetcodeID));

                    acon.Open();
                    result = cmd.ExecuteNonQuery();
                    acon.Close();
                }
                return(result);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                acon.Close();
            }
        }
Beispiel #4
0
 /// <summary>
 ///  this used to insert the Asset Codes
 /// </summary>
 /// <param name="mso_products"></param>
 /// <returns></returns>
 public int _insert_Asset_Code_info(MySqlAsmObjs mso_products)
 {
     try
     {
         int result = 0;
         {
             MySqlCommand cmd = new MySqlCommand("pro_insert_AssetCode", acon);
             cmd.CommandType = CommandType.StoredProcedure;
             cmd.Parameters.Add(new MySqlParameter("@AS_AssetCode1", mso_products.AS_AssetCode));
             cmd.Parameters.Add(new MySqlParameter("@prtids", mso_products.Pr_type_id));
             cmd.Parameters.Add(new MySqlParameter("@prid", mso_products.Prfk_id));
             cmd.Parameters.Add(new MySqlParameter("@As_cre", mso_products.As_CreatedBy));
             acon.Open();
             result = cmd.ExecuteNonQuery();
             acon.Close();
         }
         return(result);
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         acon.Close();
     }
 }
Beispiel #5
0
        /// <summary>
        /// _insert_Asset_printer_info
        /// </summary>
        /// <param name="mso_products"></param>
        /// <returns></returns>
        public int _insert_Asset_printer_info(MySqlAsmObjs mso_products)
        {
            try
            {
                int result = 0;
                {
                    MySqlCommand cmd = new MySqlCommand("Pro_insert_Asset_full_info", pcon);
                    cmd.CommandType = CommandType.StoredProcedure;


                    cmd.Parameters.Add(new MySqlParameter("@at_aseet_code_id1", mso_products.At_aseet_code_id));
                    cmd.Parameters.Add(new MySqlParameter("@at_Assetcode1", mso_products.At_Assetcode));

                    pcon.Open();
                    result = cmd.ExecuteNonQuery();
                    pcon.Close();
                }
                return(result);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                pcon.Close();
            }
        }
Beispiel #6
0
        protected void ddl_Asset_product_type_ad_SelectedIndexChanged(object sender, EventArgs e)
        {
            MySqlAsmObjs obj = new MySqlAsmObjs();

            obj.Pr_sh_name = ddl_Asset_product_type_ad.SelectedItem.Value;
            MysqlAsMDBCS ABC = new MysqlAsMDBCS();
            DataTable    dt  = ABC._load_Asset_Short_name(obj);

            if (dt.Rows.Count > 0)
            {
                txt_assetNew_Number.Text = "KPCL/" + dt.Rows[0]["pr_type_sh_Name"].ToString() + "/";
            }
        }
Beispiel #7
0
        /// <summary>
        /// to insert the full Asset INformation
        /// </summary>
        /// <returns></returns>
        ///

        public int _insert_Asset_full_info(MySqlAsmObjs mso_products)
        {
            try
            {
                int result = 0;
                {
                    MySqlCommand cmd = new MySqlCommand("Pro_insert_Asset_full_info", acon);
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new MySqlParameter("@at_type1", mso_products.At_type_id));
                    cmd.Parameters.Add(new MySqlParameter("@at_subtype1", mso_products.At_subtype_id));
                    cmd.Parameters.Add(new MySqlParameter("@at_brandMake1", mso_products.At_brandMake_id));
                    cmd.Parameters.Add(new MySqlParameter("@at_model1", mso_products.At_model_id));
                    cmd.Parameters.Add(new MySqlParameter("@at_aseet_code_id1", mso_products.At_aseet_code_id));
                    cmd.Parameters.Add(new MySqlParameter("@at_Assetcode1", mso_products.At_Assetcode));
                    cmd.Parameters.Add(new MySqlParameter("@at_productNumber1", mso_products.At_productNumber));
                    cmd.Parameters.Add(new MySqlParameter("@at_purchaseNumber1", mso_products.At_purchaseNumber));
                    cmd.Parameters.Add(new MySqlParameter("@at_SerialNumber1", mso_products.At_SerialNumber));
                    cmd.Parameters.Add(new MySqlParameter("@at_voucherNumber1", mso_products.At_voucherNumber));
                    cmd.Parameters.Add(new MySqlParameter("@at_receivedDate1", mso_products.At_receivedDate));
                    cmd.Parameters.Add(new MySqlParameter("@at_wsd1", mso_products.At_wsd));
                    cmd.Parameters.Add(new MySqlParameter("@at_wed1", mso_products.At_wed));
                    cmd.Parameters.Add(new MySqlParameter("@at_cby1", mso_products.At_cby));

                    acon.Open();
                    result = cmd.ExecuteNonQuery();
                    acon.Close();
                }
                return(result);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                acon.Close();
            }
        }
Beispiel #8
0
        public DataTable _load_Asset_models_byid(MySqlAsmObjs mys)
        {
            DataTable dt = new DataTable();

            try
            {
                acon.Open();
                MySqlCommand msc = new MySqlCommand("pro_view_model_byid", acon);
                msc.Parameters.Add(new MySqlParameter("@mo_br_id1", mys.Mo_br_id));
                msc.CommandType = CommandType.StoredProcedure;
                MySqlDataAdapter da = new MySqlDataAdapter(msc);
                da.Fill(dt);
            }
            catch
            {
                throw new Exception("who knows ahammed");
            }
            finally
            {
                acon.Close();
            }
            return(dt);
        }
Beispiel #9
0
        public DataTable _load_Asset_Short_name(MySqlAsmObjs mys)
        {
            DataTable dt = new DataTable();

            try
            {
                acon.Open();
                MySqlCommand msc = new MySqlCommand("pro_view_shortName", acon);
                msc.Parameters.Add(new MySqlParameter("shname", mys.Pr_sh_name));
                msc.CommandType = CommandType.StoredProcedure;
                MySqlDataAdapter da = new MySqlDataAdapter(msc);
                da.Fill(dt);
            }
            catch
            {
                throw new Exception("who knows ahammed");
            }
            finally
            {
                acon.Close();
            }
            return(dt);
        }
Beispiel #10
0
        //pro_view_brands_by_prptr_ids
        public DataTable _load_Asset_brands_byprptrid(MySqlAsmObjs mys)
        {
            DataTable dt1 = new DataTable();

            try
            {
                acon.Open();
                MySqlCommand msc = new MySqlCommand("pro_view_brands_by_prptr_ids", acon);
                msc.Parameters.Add(new MySqlParameter("prid", mys.Pr_id));
                msc.Parameters.Add(new MySqlParameter("prtid", mys.Pr_type_id));
                msc.CommandType = CommandType.StoredProcedure;
                MySqlDataAdapter da = new MySqlDataAdapter(msc);
                da.Fill(dt1);
            }
            catch
            {
                throw new Exception("who knows ahammed");
            }
            finally
            {
                acon.Close();
            }
            return(dt1);
        }