示例#1
0
 public PaletDesigner(PekpanDal pekpanDal, string kullaniciAdi, int designID = 0)
 {
     InitializeComponent();
     _pekpanDal    = pekpanDal;
     _kullaniciAdi = kullaniciAdi;
     _designID     = designID;
     using (SqlDataReader rdr = _pekpanDal.GetDataReader("select MarkaAciklama from TARA_Markalar"))
     {
         if (rdr != null)
         {
             while (rdr.Read())
             {
                 DataGridViewRow row = new DataGridViewRow();
                 row.CreateCells(gv);
                 row.Cells[0].Value = rdr["MarkaAciklama"].ToString();
                 gv.Rows.Add(row);
             }
         }
     }
 }
示例#2
0
 public Designs(PekpanDal pekpanDal, string kullaniciAdi)
 {
     InitializeComponent();
     _pekpanDal    = pekpanDal;
     _kullaniciAdi = kullaniciAdi;
 }
示例#3
0
 public Login(PekpanDal pekpanDal)
 {
     InitializeComponent();
     _pekpanDal = pekpanDal;
 }
示例#4
0
        public PaletDesigner(PekpanDal pekpanDal, string kullaniciAdi, int designID, List <string> designList)
        {
            InitializeComponent();
            _pekpanDal    = pekpanDal;
            _kullaniciAdi = kullaniciAdi;
            _designID     = designID;
            txAd.Text     = designList[0];
            udbx.Value    = Convert.ToInt32(designList[1]);
            udby.Value    = Convert.ToInt32(designList[2]);
            udox.Value    = Convert.ToInt32(designList[3]);
            udoy.Value    = Convert.ToInt32(designList[4]);
            udz.Value     = Convert.ToInt32(designList[5]);
            udTork.Value  = Convert.ToInt32(designList[6]);
            udgen1.Value  = Convert.ToInt32(designList[7]);
            udgen2.Value  = Convert.ToInt32(designList[8]);
            udboy1.Value  = Convert.ToInt32(designList[9]);
            udboy2.Value  = Convert.ToInt32(designList[10]);

            using (SqlDataReader rdr = _pekpanDal.GetDataReader("select MarkaAciklama from TARA_Markalar"))
            {
                if (rdr != null)
                {
                    while (rdr.Read())
                    {
                        DataGridViewRow row = new DataGridViewRow();
                        row.CreateCells(gv);
                        row.Cells[0].Value = rdr["MarkaAciklama"].ToString();
                        gv.Rows.Add(row);
                    }
                }
            }

            for (int i = 1; i <= 12; i++)
            {
                List <string> cells = _pekpanDal.GetDataReaderListColumn2("select PanelNo,ProdNo,Rot from TARA_PalCells where DesignID=" + _designID + " and PanelNo=" + i + "", 3);
                if (cells.Count != 0)
                {
                    CheckBox cb = ProdCheckBox(i);
                    cb.CheckState = CheckState.Checked;
                    NumericUpDown ud = ProdUpDown(i);
                    ud.Value = Convert.ToInt32(cells[1]);
                    Button bRot = ProdButton(i);
                    if (cells[2] == "90")
                    {
                        btnPalet_Click(bRot, EventArgs.Empty);
                    }
                    else if (cells[2] == "180")
                    {
                        for (int j = 0; j < 2; j++)
                        {
                            btnPalet_Click(bRot, EventArgs.Empty);
                        }
                    }
                    else if (cells[2] == "270")
                    {
                        for (int j = 0; j < 3; j++)
                        {
                            btnPalet_Click(bRot, EventArgs.Empty);
                        }
                    }
                }
            }
            List <string> markaAciklamas = _pekpanDal.GetDataReaderList("SELECT MarkaAciklama FROM TARA_PalMarka WHERE DesignID = '" + _designID + "'");

            for (int i = 0; i < markaAciklamas.Count; i++)
            {
                gvEkleForUpdate(Convert.ToInt32(_pekpanDal.ExecuteScalarStr("SELECT Y.Satir FROM ( SELECT ROW_NUMBER() OVER(ORDER BY MarkaKod) AS Satir,* FROM TARA_Markalar ) Y WHERE Y.MarkaAciklama= '" + markaAciklamas[i] + "'")));
            }
        }