using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

using System.Xml;
using System.IO;
using ABC.DanhMuc.KhachHang;
using System.Data;
using ABC.DanhMuc.NhomKhachHang;
using ABC.File;
using DevExpress.XtraSpreadsheet;
using ABC.KetNoi;
using DevExpress.XtraEditors;

namespace ABC.DanhMuc.KhachHang
{
    
    public partial class KhachHang_Forms : DevExpress.XtraEditors.XtraUserControl {
        public KhachHang_Forms()
        {           
            InitializeComponent();
            this.Text = "Danh mục khách hàng";
            event_click();
            tailai();
            //data();
            gv.CellValueChanged += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(gv_CellValueChanged);
        }
        #region gv_value_changed
        void gv_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            if (e.Column.FieldName != "Select")
            {
                DataRow dr = gv.GetDataRow(gv.FocusedRowHandle);
                if (e.Column.FieldName != "Name")
                {
                     if (e.Column.FieldName == "MatKhau")
                    {
                        DataRow[] dr_name = DuLieu.List_KhachHang.Tables[0].Select("MatKhau = '" + dr["MatKhau"].ToString().Trim() + "'");
                        if (dr_name.Length > 0 && dr["MatKhau"].ToString().Trim().Length>0)
                        {
                            msgbox.dialog_OK_Questios("Mã truy cập web cho khách này đã thuộc về người khác. Vui lòng tạo mã khác!");
                            gv.CancelUpdateCurrentRow();
                        }
                         else
                            save(dr);
                    }
                    else
                      save(dr);
                }
                
                else
                {
                    DataRow[] dr_name = DuLieu.List_KhachHang.Tables[0].Select("Name = '" + e.Value.ToString().ToUpper() + "' AND ID <> '" + dr["ID"].ToString().ToUpper() + "'");
                    if (dr_name.Length > 0)
                    {
                        msgbox.dialog_OK_Questios("Trùng tên!");
                        gv.CancelUpdateCurrentRow();
                    }
                    else
                    {
                        save(dr);
                    }
                }
            }
        }
        public void save(DataRow dr)
        {
            if (Pow.kiemtra("KhachHang_Forms", "Sua",Get_CauHinh.Dt_Login.Rows[0]["ID"].ToString().ToUpper()) == true)
            {
                
                #region
                DataRowView row = repositoryItemLookUpEdit_ID1.GetDataSourceRowByKeyValue(dr["_ID1_Name"].ToString()) as DataRowView;
                string sql = "Tbl_KhachHang_insert2019 ";
                sql += "N'" + dr["ID"].ToString().ToUpper() + "',";
                sql += "N'" + dr["Name"].ToString().ToUpper() + "',";
                sql += "N'" + dr["Note"].ToString() + "',";

                sql += "N'" + Get_CauHinh.Ngay_DN + "',";
                sql += "N'" + Get_CauHinh.Dt_Login.Rows[0]["ID"].ToString().ToUpper() + "',";
                //msgbox.dialog_OK_info(dr["IS_User"].ToString());
                if (dr["IS_User"].ToString() == "True")
                {
                    sql += "N'1',";
                }
                else
                {
                    sql += "N'0',";
                }

                sql += "N'" + dr["_Text1"].ToString() + "',";
                sql += "N'" + dr["_Text2"].ToString() + "',";
                sql += "N'" + dr["_Text3"].ToString() + "',";
                sql += "N'" + dr["_Text4"].ToString() + "',";
                sql += "N'',";
                sql += "N'',";
                sql += "N'',";
                sql += "N'',";
                sql += "N'',";

                sql += "NULL,";
                sql += "NULL,";
                sql += "NULL,";

                sql += "N'"+row["ID"].ToString()+"',";
                sql += "NULL,";
                sql += "NULL,";
                sql += dr["HanMuc"].ToString()+",";
                sql += "N'"+dr["MatKhau"].ToString()+"',";
                sql += bool.Parse(dr["KhoaTruyCapWeb"].ToString());

                _KhachHang_Class.set(sql);
                Class_KetNoi cls = new Class_KetNoi();
                DataTable dt = cls.T_opendataset("select * from Tbl_KhachHang where ID='" + dr["ID"].ToString() + "'").Tables[0];
                string ndCu = "", ndMoi = "";
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Columns.Count; i++)
                    {
                        ndCu += dt.Columns[i].ColumnName + "(" + dt.Rows[0][dt.Columns[i].ColumnName].ToString().Trim() + ") ";
                        ndMoi += dt.Columns[i].ColumnName + "(" + dr[dt.Columns[i].ColumnName].ToString().Trim() + ") ";
                    }
                }
                DuLieu.LuuLuocSu(Main_Form._tk, this.Name, ndCu, ndMoi, "Sửa");

                data();



                #endregion
            }
            else
            {
                gv.CancelUpdateCurrentRow();
            }
        }
        #endregion

        #region lệnh dùng chung
        KhachHang_Form1 _KhachHang_Form;
        public void them()
        {
            if (Pow.kiemtra("KhachHang_Forms", "Them", Get_CauHinh.Dt_Login.Rows[0]["ID"].ToString().ToUpper()) == true)
            {
                _KhachHang_Form = new KhachHang_Form1();
                _KhachHang_Form.TextChanged += new EventHandler(_KhachHang_Form_TextChanged);
                _KhachHang_Form.FormClosed += new FormClosedEventHandler(_KhachHang_Form_FormClosed);
                _KhachHang_Form.ShowDialog();
            }
        }

        void _KhachHang_Form_FormClosed(object sender, FormClosedEventArgs e)
        {
            tailai();
        } 
        void _KhachHang_Form_TextChanged(object sender, EventArgs e)
        {
            tailai();
            data();
            gv.RefreshData();

        }
        public void excel()
        {
        }
        public void xoa()
        {
            if (Pow.kiemtra("KhachHang_Forms", "Xoa", Get_CauHinh.Dt_Login.Rows[0]["ID"].ToString().ToUpper()) == true)
            {
                if (msgbox.dialog_yes_no("Xóa dòng chọn?") == DialogResult.Yes)
                {
                    DataRow[] dr = DuLieu.List_KhachHang.Tables[0].Select("Select = " + true + "");
                    for (int i = 0; i < dr.Length; i++)
                    {
                        string sql = "Delete from Tbl_KhachHang where ID = '" + dr[i]["ID"].ToString().ToUpper() + "'";
                        _KhachHang_Class.set(sql);
                        //
                        string ndCu = "";
                        for (int j = 0; j < gv.Columns.Count; j++)
                        {
                            ndCu += gv.Columns[j].FieldName + "(" + gv.GetRowCellValue(i, gv.Columns[j].FieldName).ToString().Trim() + ") ";
                        }
                        DuLieu.LuuLuocSu(Main_Form._tk, this.Name, ndCu, "", "Xoá");
                    }
                    tailai();
                    data();

                }
            }
        }
        public void sua()
        {
        }       
        public void chon()
        {
            for (int i = 0; i < DuLieu.List_KhachHang.Tables[0].Rows.Count; i++)
            {
                DuLieu.List_KhachHang.Tables[0].Rows[i]["Select"] = true;
            }
            DuLieu.List_KhachHang.Tables[0].AcceptChanges();
            gv.RefreshData();
        }
        public void bochon()
        {
            for (int i = 0; i < DuLieu.List_KhachHang.Tables[0].Rows.Count; i++)
            {
                DuLieu.List_KhachHang.Tables[0].Rows[i]["Select"] = false;
            }
            DuLieu.List_KhachHang.Tables[0].AcceptChanges();
            gv.RefreshData();
        }
        public void chep()
        {
            DataRow dr = gv.GetDataRow(gv.FocusedRowHandle);
            if (Pow.kiemtra("KhachHang_Forms", "Them", Get_CauHinh.Dt_Login.Rows[0]["ID"].ToString().ToUpper()) == true)
            {
                _KhachHang_Form = new KhachHang_Form1();
                _KhachHang_Form.TextChanged += new EventHandler(_KhachHang_Form_TextChanged);
                _KhachHang_Form.dr = dr;
                _KhachHang_Form.ShowDialog();
            }
        }
        public void tailai()
        {
            //  _KhachHang_Class.get_store("sp_KhachHang_Load");
            //XemNo_1Ngay 44808,Null,Null,'59EC59E3-5919-4B88-971F-031BCA23FCBA'
            Class_KetNoi db = new Class_KetNoi();
            string sql = @"Select Tbl_KhachHang.*,Tbl_NhomKhachHang.Name as _ID1_Name,Tbl_KhachHang.ID as ID_KhachHang ,    
    Tbl_KhachHang.Name as Tbl_KhachHang_Name   
    from Tbl_KhachHang
    INNER JOIN Tbl_NhomKhachHang on Tbl_KhachHang._ID1 = Tbl_NhomKhachHang.ID
     order by Tbl_NhomKhachHang.Name asc, Tbl_KhachHang.Name ASC ";
            DuLieu.List_KhachHang = db.T_opendataset(sql);
            DuLieu.List_KhachHang.Tables[0].Columns.Add("Select", typeof(bool));
            DuLieu.List_KhachHang.Tables[0].Columns.Add("TongNo", typeof(double));
            int ng1 = (int)(dtpTu.DateTime - new DateTime(1900, 1, 1)).TotalDays;
            int ng2 = (int)(dtpDen.DateTime - new DateTime(1900, 1, 1)).TotalDays;
            string sql2 = "XemNo_1Ngay_KH " + ng1.ToString() + "," + ng2.ToString() + ",Null,Null,Null";
            DataTable dtTongNo = db.T_opendataset(sql2).Tables[0];
            DataView view = dtTongNo.Copy().DefaultView;
            for (int i = 0; i < DuLieu.List_KhachHang.Tables[0].Rows.Count; i++)
            {
                view.RowFilter = "ID_KhachHang='"+ DuLieu.List_KhachHang.Tables[0].Rows[i]["ID_KhachHang"].ToString()+"'";
                if (view.ToTable().Rows.Count > 0)
                    DuLieu.List_KhachHang.Tables[0].Rows[i]["TongNo"] = double.Parse(view.ToTable().Rows[0]["TongNo"].ToString());
            }
           
            Main_Form._dtKH = DuLieu.List_KhachHang.Tables[0];
            data();
        }
        #endregion

        #region menu click
        public void event_click()
        {
            //btn_new.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(btn_new_ItemClick);
            //btn_excel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(btn_excel_ItemClick);
            //btn_del.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(btn_del_ItemClick);
            //btn_all.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(btn_all_ItemClick);
            //btn_none.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(btn_none_ItemClick);
            //btn_copy.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(btn_copy_ItemClick);
            btn_new.Click += new EventHandler(btn_new_Click);
            btn_del.Click += new EventHandler(btn_del_Click);
            btn_copy.Click += new EventHandler(btn_copy_Click);
            btn_all.Click += new EventHandler(btn_all_Click);
            btn_none.Click += new EventHandler(btn_none_Click);
            btn_close.Click += new EventHandler(btn_close_Click);
            btn_load.Click += new EventHandler(btn_load_Click);
        }

        void btn_load_Click(object sender, EventArgs e)
        {
            tailai();
        }

        void btn_close_Click(object sender, EventArgs e)
        {
          //  this.Close();
        }

        void btn_none_Click(object sender, EventArgs e)
        {
            bochon();
        }

        void btn_all_Click(object sender, EventArgs e)
        {
            chon();
        }

        void btn_copy_Click(object sender, EventArgs e)
        {
            chep();
        }

        void btn_del_Click(object sender, EventArgs e)
        {
            xoa();
        }

        void btn_new_Click(object sender, EventArgs e)
        {
            them();
        }

        void btn_copy_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            chep();
        }

        void btn_none_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bochon();
        }

        void btn_all_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            chon();
        }

        void btn_del_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            xoa();
        }

        void btn_excel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            excel();
        }


        #endregion

        #region data
        KhachHang_Class _KhachHang_Class = new KhachHang_Class();
        Class_KetNoi cls = new Class_KetNoi();
        NhomKhachHang_Class _NhomKhachHang_Class = new NhomKhachHang_Class();
        public void data()
        {
            _NhomKhachHang_Class.get_store("sp_NhomKhachHang_Load");
            // _KhachHang_Class.get_store("sp_KhachHang_Load");
              gc.DataSource = DuLieu.List_KhachHang.Tables[0];
            //gc.DataSource = cls.T_opendataset("Select Tbl_KhachHang.*,Tbl_NhomKhachHang.Name as _ID1_Name,Tbl_KhachHang.ID as ID_KhachHang ,   "+ 
            //                        " Tbl_KhachHang.Name as Tbl_KhachHang_Name "+
            //                         " from Tbl_KhachHang " +
            //                         " INNER JOIN Tbl_NhomKhachHang on Tbl_KhachHang._ID1 = Tbl_NhomKhachHang.ID " +
            //                         "  order by Tbl_NhomKhachHang.Name asc, Tbl_KhachHang.Name ASC ").Tables[0];
            repositoryItemLookUpEdit_ID1.DataSource = DuLieu.List_Nhom_KhachHang.Tables[0];
            gv.ExpandAllGroups();
            gv.RefreshData();
           
        }
        #endregion

        private void KhachHang_Forms_Load(object sender, EventArgs e)
        {
            dtpTu.DateTime = DateTime.Now;
            dtpDen.DateTime = DateTime.Now;
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                string path = dialog.SelectedPath;
                gv.ExportToXls(path + "\\KhachHang.xls");
            }
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            clsConnect cls = new clsConnect();
            SpreadsheetControl sheet = new SpreadsheetControl();
            OpenFileDialog dialog = new OpenFileDialog();
            dialog.Filter = "Excel Files(.xls)|*.xls|Excel Files(.xlsx)| *.xlsx";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                sheet.LoadDocument(dialog.FileName);
                #region code insert
                int count = sheet.ActiveWorksheet.Rows.LastUsedIndex;
                for (int i = 1; i <= count; i++)
                {
                    string _nhom = sheet.ActiveWorksheet.Rows[i]["A"].Value.ToString();
                    string _name = sheet.ActiveWorksheet.Rows[i]["B"].Value.ToString();
                    string _Text1 = sheet.ActiveWorksheet.Rows[i]["C"].Value.ToString();
                    string _Text2 = sheet.ActiveWorksheet.Rows[i]["D"].Value.ToString();
                    string _Text3 = sheet.ActiveWorksheet.Rows[i]["E"].Value.ToString();
                    string _Text4 = sheet.ActiveWorksheet.Rows[i]["F"].Value.ToString();
                    string _hanMuc = sheet.ActiveWorksheet.Rows[i]["G"].Value.ToString();
                    string _mk_web = sheet.ActiveWorksheet.Rows[i]["H"].Value.ToString();
                    if (_name != "")
                    {
                        string _IDNhom = "";
                        DataTable dt = cls.LoadTable("select * from Tbl_NhomKhachHang where Name=N'"+ _nhom+"'");
                        if (dt.Rows.Count > 0)
                            _IDNhom = dt.Rows[0]["ID"].ToString();
                        //
                        string sql1 = "select * from Tbl_KhachHang where Name=@Name";
                        int thamso1 = 1;
                        string[] name1 = new string[thamso1];
                        object[] value1 = new object[thamso1];
                        name1[0] = "@Name";
                        value1[0] = _name;
                        DataTable dt1 = cls.LoadTable(sql1, name1, value1, thamso1).Tables[0];
                        if (dt1.Rows.Count == 0)
                        {
                            //
                            string sql = "insert into Tbl_KhachHang(_ID1,ID,Name,_Text1,_Text2,_Text3,_Text4,HanMuc,MatKhau,KhoaTruyCapWeb,IS_User,Date_Num_Final_UpDate,User_ID_Final_UpDate)" +
                            "values(@_ID1,@ID,@Name,@_Text1,@_Text2,@_Text3,@_Text4,@HanMuc,@MatKhau,@KhoaTruyCapWeb,@IS_User,@Date_Num_Final_UpDate,@User_ID_Final_UpDate)";
                            int thamso = 13;
                            string[] name = new string[thamso];
                            object[] value = new object[thamso];
                            name[0] = "@ID";
                            name[1] = "@Name";
                            name[2] = "@_Text1";
                            name[3] = "@_Text2";
                            name[4] = "@_Text3";
                            name[5] = "@_Text4";
                            name[6] = "@HanMuc";
                            name[7] = "@MatKhau";
                            name[8] = "@KhoaTruyCapWeb";
                            name[9] = "@IS_User";
                            name[10] = "@Date_Num_Final_UpDate";
                            name[11] = "@User_ID_Final_UpDate";
                            name[12] = "@_ID1";
                            value[0] = Guid.NewGuid().ToString().ToUpper();
                            value[1] = _name;
                            value[2] = _Text1;
                            value[3] = _Text2;
                            value[4] = _Text3;
                            value[5] = _Text4;
                            value[6] = (_hanMuc == "") ? 0 : decimal.Parse(_hanMuc);
                            value[7] = _mk_web;
                            value[8] = 0;
                            value[9] = 1;
                            value[10] = Get_CauHinh.Ngay_DN;
                            value[11] = Get_CauHinh.Dt_Login.Rows[0]["ID"].ToString().ToUpper();
                            value[12] = _IDNhom;
                            cls.UpdateTable(sql, name, value, thamso);
                        }
                    }
                }
                MessageBox.Show("Đã đưa vào được " + count.ToString() + " dòng!");
                tailai();
                data();
                #endregion
            }
        }

        private void gv_CellValueChanging(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
           
        }

        private void repositoryChon_CheckedChanged(object sender, EventArgs e)
        {
            string _ID = gv.GetFocusedRowCellValue("ID").ToString().Trim();
            string _Chon = (gv.GetFocusedRowCellValue("Chon").ToString().Trim() != "True") ? "1" : "0";
            string sql = "update Tbl_KhachHang set Chon=" + _Chon + " where ID='" + _ID + "'";
            ABC.KetNoi.Class_KetNoi db = new KetNoi.Class_KetNoi();
            db.updateTable(sql);
            //tailai();
        }

        private void simpleButton3_Click(object sender, EventArgs e)
        {
            tailai();
        }

        private void simpleButton4_Click(object sender, EventArgs e)
        {
            Class_KetNoi db = new Class_KetNoi();
            string sql = @"Select Tbl_KhachHang.*,Tbl_NhomKhachHang.Name as _ID1_Name,Tbl_KhachHang.ID as ID_KhachHang ,    
    Tbl_KhachHang.Name as Tbl_KhachHang_Name   
    from Tbl_KhachHang
    INNER JOIN Tbl_NhomKhachHang on Tbl_KhachHang._ID1 = Tbl_NhomKhachHang.ID
     order by Tbl_NhomKhachHang.Name asc, Tbl_KhachHang.Name ASC ";
            DuLieu.List_KhachHang = db.T_opendataset(sql);
            DuLieu.List_KhachHang.Tables[0].Columns.Add("Select", typeof(bool));
            DuLieu.List_KhachHang.Tables[0].Columns.Add("TongNo", typeof(double));
            int ng1 = (int)(dtpTu.DateTime - new DateTime(1900, 1, 1)).TotalDays;
            int ng2 = (int)(dtpDen.DateTime - new DateTime(1900, 1, 1)).TotalDays;
            string sql2 = "XemNo_1Ngay_KH " + ng1.ToString() + "," + ng2.ToString() + ",Null,Null,Null";
            DataTable dtTongNo = db.T_opendataset(sql2).Tables[0];
            DataView view = dtTongNo.Copy().DefaultView;
            for (int i = 0; i < DuLieu.List_KhachHang.Tables[0].Rows.Count; i++)
            {
                view.RowFilter = "ID_KhachHang='" + DuLieu.List_KhachHang.Tables[0].Rows[i]["ID_KhachHang"].ToString() + "'";
                if (view.ToTable().Rows.Count > 0)
                    DuLieu.List_KhachHang.Tables[0].Rows[i]["TongNo"] = double.Parse(view.ToTable().Rows[0]["Ton"].ToString());
                else
                    DuLieu.List_KhachHang.Tables[0].Rows[i]["TongNo"] = 0;
            }
            DataView view1 = DuLieu.List_KhachHang.Tables[0].Copy().DefaultView;
            view1.RowFilter = "TongNo=0";
            DuLieu.List_KhachHang.Tables[0].Rows.Clear();
            DuLieu.List_KhachHang.Tables[0].Merge(view1.ToTable());
            Main_Form._dtKH = DuLieu.List_KhachHang.Tables[0];
            data();
        }

        private void simpleButton5_Click(object sender, EventArgs e)
        {
            Class_KetNoi db = new Class_KetNoi();
            string sql = @"Select Tbl_KhachHang.*,Tbl_NhomKhachHang.Name as _ID1_Name,Tbl_KhachHang.ID as ID_KhachHang ,    
    Tbl_KhachHang.Name as Tbl_KhachHang_Name   
    from Tbl_KhachHang
    INNER JOIN Tbl_NhomKhachHang on Tbl_KhachHang._ID1 = Tbl_NhomKhachHang.ID
     order by Tbl_NhomKhachHang.Name asc, Tbl_KhachHang.Name ASC ";
            DuLieu.List_KhachHang = db.T_opendataset(sql);
            DuLieu.List_KhachHang.Tables[0].Columns.Add("Select", typeof(bool));
            DuLieu.List_KhachHang.Tables[0].Columns.Add("NoMoi", typeof(double));
            DuLieu.List_KhachHang.Tables[0].Columns.Add("MoiTra", typeof(double));
            int ng1 = (int)(dtpTu.DateTime - new DateTime(1900, 1, 1)).TotalDays;
            int ng2 = (int)(dtpDen.DateTime - new DateTime(1900, 1, 1)).TotalDays;
            string sql2 = "XemNo_1Ngay_KH " + ng1.ToString()+","+ng2.ToString() + ",Null,Null,Null";
            DataTable dtTongNo = db.T_opendataset(sql2).Tables[0];
            DataView view = dtTongNo.Copy().DefaultView;
            for (int i = 0; i < DuLieu.List_KhachHang.Tables[0].Rows.Count; i++)
            {
                view.RowFilter = "ID_KhachHang='" + DuLieu.List_KhachHang.Tables[0].Rows[i]["ID_KhachHang"].ToString() + "'";
                if (view.ToTable().Rows.Count > 0)
                {
                    DuLieu.List_KhachHang.Tables[0].Rows[i]["NoMoi"] = double.Parse(view.ToTable().Rows[0]["NoMoi"].ToString());
                    DuLieu.List_KhachHang.Tables[0].Rows[i]["MoiTra"] = double.Parse(view.ToTable().Rows[0]["MoiTra"].ToString());
                }
                else
                {
                    DuLieu.List_KhachHang.Tables[0].Rows[i]["NoMoi"] = 0;
                    DuLieu.List_KhachHang.Tables[0].Rows[i]["MoiTra"] = 0;
                }
            }
            DataView view1 = DuLieu.List_KhachHang.Tables[0].Copy().DefaultView;
            view1.RowFilter = "NoMoi=0 and MoiTra=0";
            DuLieu.List_KhachHang.Tables[0].Rows.Clear();
            DuLieu.List_KhachHang.Tables[0].Merge(view1.ToTable());
            Main_Form._dtKH = DuLieu.List_KhachHang.Tables[0];
            data();
        }

        internal void ShowDialog()
        {
            throw new NotImplementedException();
        }
    }
}
