Example #1
0
    public static DataTable  selling_data()
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "tbl_selling_all_data_sp";
        return(Create_Command.Execute_Query(cmd));
    }
Example #2
0
    //in manage order.axps
    public static DataTable load_order_data()
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "load_order_data";
        return(Create_Command.Execute_Query(cmd));
    }
Example #3
0
    //find order id
    public static DataTable find_order_id()
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "find_order_id";
        return(Create_Command.Execute_Query(cmd));
    }
Example #4
0
    //customer who has not paid total amount of the order
    public static DataTable load_order_remaining_amount()
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "load_order_remaining_amount";
        return(Create_Command.Execute_Query(cmd));
    }
Example #5
0
    public static DataTable get_data_with_one_para(string pname)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        return(Create_Command.Execute_Query(cmd));
    }
Example #6
0
    // this procedure is used for finding customer who has not paid their bill used in  customer_pending_amount.aspx page
    public static DataTable find_customer_pending_bill()
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "customer_remaining_amount";
        return(Create_Command.Execute_Query(cmd));
    }
Example #7
0
    public static DataTable find_remaining_customer_Data(String pname, String bill_no)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_String("@bill_no", bill_no));
        return(Create_Command.Execute_Query(cmd));
    }
Example #8
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));
    }
Example #9
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));
    }
Example #10
0
    public static DataTable Find_Stock(String pname, String sub_cat_id)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_String("@sub_cat_id", sub_cat_id));
        return(Create_Command.Execute_Query(cmd));
    }
Example #11
0
    public static DataTable completed_orders()
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "completed_orders";

        return(Create_Command.Execute_Query(cmd));
    }
Example #12
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));
    }
Example #13
0
    public static DataTable select_customer_bill_info(string pname, string cust_name)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_String("@customer_name", cust_name));
        return(Create_Command.Execute_Query(cmd));
    }
Example #14
0
    public static DataTable search_product2(string pname, string prod_name)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add("@prod_name", prod_name);
        return(Create_Command.Execute_Query(cmd));
    }
Example #15
0
    public static DataTable search_product(string pname, string prod_unique_no)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_unique_no", prod_unique_no));
        return(Create_Command.Execute_Query(cmd));
    }
Example #16
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));
    }
Example #17
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));
    }
Example #18
0
    //load user data in home page
    public static DataTable find_user_data(string @u_name)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "find_user_data";
        cmd.Parameters.Add(Create_Parameter.Convert_String("@u_name", u_name));
        return(Create_Command.Execute_Query(cmd));
    }
Example #19
0
    //forgot password
    public static DataTable select_data_tbl_user(string u_name)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "select_data_tbl_user";
        cmd.Parameters.Add(Create_Parameter.Convert_String("@u_name", u_name));
        return(Create_Command.Execute_Query(cmd));
    }
Example #20
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));
    }
Example #21
0
    public static DataTable Find_Total_Payment(String pname, String cus_id, String bill_no)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_String("@cus_id", cus_id));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@bill_no", bill_no));
        return(Create_Command.Execute_Query(cmd));
    }
Example #22
0
    public static DataTable get_data_with_three_para2(string pname, string id, string id2)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = pname;
        cmd.Parameters.Add(Create_Parameter.Convert_String("@sub_cat_id", id));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@prod_id", id2));
        return(Create_Command.Execute_Query(cmd));
    }
Example #23
0
    public static DataTable select_tbl_product_selling_from_to(string from1, string to1)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "select_tbl_product_selling_from_to";
        cmd.Parameters.Add(Create_Parameter.Convert_String("@from1", from1));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@to1", to1));
        return(Create_Command.Execute_Query(cmd));
    }
Example #24
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));
    }
Example #25
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));
    }
    protected void btn_ok_Click(object sender, EventArgs e)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandText = "insert_tbl_alert_sp";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("@alert_date", Convert.ToString(txt_alert_date.Text));
        cmd.Parameters.Add("@alert_for", Convert.ToByte(ddl_alert_type.SelectedIndex));
        cmd.Parameters.Add("@alert_time", Convert.ToInt32(txt_alert_time.Text));
        Create_Command.Execute_Non_Query(cmd);
    }
Example #27
0
    public static int update_password(string user_name, string password)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "update_password";
        cmd.Parameters.Add(Create_Parameter.Convert_String("@user_name", user_name));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@new_password", password));

        return(Create_Command.Execute_Non_Query(cmd));
    }
Example #28
0
    //used in login page
    public static DataTable Login(String username, String password)
    {
        SqlCommand cmd = new SqlCommand();

        cmd.Parameters.Add(Create_Parameter.Convert_String("@username", username));
        cmd.Parameters.Add(Create_Parameter.Convert_String("@password", password));

        cmd.CommandText = "tbl_user_login";

        return(Create_Command.Execute_Query(cmd));
    }
Example #29
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));
    }
Example #30
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));
    }