Ejemplo n.º 1
0
    public static DataTable load_customer_data_new_order(string bill_no)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "load_customer_data_new_order";
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", bill_no));
        return(Create_Command.Execute_Query(cmd));
    }
Ejemplo n.º 2
0
    public static DataTable get_data_crystal(string pname, string bill)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", bill));
        return(Create_Command.Execute_Query(cmd));
    }
Ejemplo n.º 3
0
    //fill remaining amount in order //update remaininig amount
    public static DataTable fill_remaining_amoung_order(string @bill_no)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "fill_remaining_amoung_order";
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", bill_no));
        return(Create_Command.Execute_Query(cmd));
    }
Ejemplo n.º 4
0
    public static DataTable select_data_order_selling(string bill_no)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "select_data_order_selling";
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", bill_no));
        return(Create_Command.Execute_Query(cmd));
    }
Ejemplo n.º 5
0
    public static int Delete_data(string pname, string id)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@id", id));
        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 6
0
    public static DataTable get_data_with_two_para(string pname, string id)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@id", id));
        return(Create_Command.Execute_Query(cmd));
    }
Ejemplo n.º 7
0
    //used in update the bill amount from the home page
    public static int update_remaining_amount(string bill, string remaining_amount)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "update_remaining_bill";
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", bill));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@remaining_amount", remaining_amount));

        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 8
0
    public static int Insert_Stock(User_Property_Tbl_Stock u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "insert_tbl_stock_sp";
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@sub_cat_id", u.sub_cat_id));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@current_stock", u.current_stock));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@l_date", u.l_date));

        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 9
0
    public static int Insert_Sub_Category(User_Property_Tbl_Sub_Category u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "insert_tbl_sub_category";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@cat_id", u.cat_id));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@sub_cat_name", u.sub_cat_name));

        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 10
0
    public static int deduct_stock(string sub_cat_id, string stock)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "update_stock";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@sub_cat_id", sub_cat_id));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@current_stock", stock));

        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 11
0
    public static int Update_Customer(User_Property_Tbl_Customer u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "update_tbl_customer";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@c_id", u.c_id));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@c_name", u.c_name));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@c_mobile_no", u.c_mobile_no));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@c_email_address", u.c_email_address));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@c_address", u.c_address));

        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 12
0
    public static int Insert_Order_Selling(User_Property_Tbl_Order_Selling u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "insert_tbl_order_selling";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@total_payment", u.total_payment));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", u.bill_no));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@paid_amount", u.paid_amount));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@remaining_amount", u.remaininig_amount));


        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 13
0
    public static int Update_Old_Intake(User_Property_Tbl_Old_Intake u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "update_tbl_old_intake_sp";
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@old_id", u.old_id));

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@s_cat_id", u.s_cat_id));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_description", u.prod_description));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@prod_weight", u.prod_weight));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@prod_price", u.prod_price));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_type", u.prod_type));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@intake_date", u.in_date));
        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 14
0
    public static int Insert_Temp_Selling(User_Property_Tbl_Temp_Selling u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "insert_tbl_temp_selling_sp";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@p_id", u.p_id));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@c_id", u.c_id));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@prod_price", u.prod_price));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", u.bill_no));



        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 15
0
    public static int Insert_Selling(Userr_Property_Tbl_Selling u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "insert_tbl_selling_sp";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@c_id", u.c_id));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", u.bill_no));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@total_amount", u.total_amount));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@current_pay", u.current_pay));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@remaining_amount", u.remaining_amount));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@purchase_date", u.purchase_date));

        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 16
0
    public static int Insert_Order_Temp_Selling(User_Property_Tbl_Order_Temp_Selling u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "insert_tbl_order_temp_selling";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@order_id", u.order_id));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@product_name", u.product_name));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@total_amount", u.total_amount));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@bill_no", u.bill_no));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@c_id", u.c_id));


        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 17
0
    public static int Insert_Product(User_Property_Tbl_Product u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "insert_tbl_product_sp";

        cmd.Parameters.Add(Create_Parameter.Convert_Int("@d_id", u.d_id));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_name", u.prod_name));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_unique_no", u.prod_unique_no));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@prod_price", u.prod_price));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@sub_cat_id", u.sub_Cat_id));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@prod_weight", u.prod_weight));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_description", u.prod_description));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_quality", u.prod_quality));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_type", u.prod_type));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@product_purchase_date", u.purchase_date));


        return(Create_Command.Execute_Non_Query(cmd));
    }
Ejemplo n.º 18
0
    public static int Insert_Order(User_Property_Tbl_Order u)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "insert_tbl_order_sp";

        cmd.Parameters.Add(Create_Parameter.Convert_String("@product_name", u.product_name));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@sub_cat_id", u.sub_cat_id));

        cmd.Parameters.Add(Create_Parameter.Convert_String("@book_name", u.book_name));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@design_no", u.design_no));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@prod_weight", u.prod_weight));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@o_type", u.o_type));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@order_date", u.order_date));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@order_complete_date", u.order_complete_date));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@order_quality", u.order_quality));
        cmd.Parameters.Add(Create_Parameter.Convert_Int("@product_price", u.product_price));


        return(Create_Command.Execute_Non_Query(cmd));
    }