Esempio n. 1
0
        public static List <ENTITYPERSONEL> PERLIST()
        {
            List <ENTITYPERSONEL> degerler = new List <ENTITYPERSONEL>();
            SqlCommand            komut    = new SqlCommand("PERSONEL", SQLBAGLANTISI.bgl);

            komut.CommandType = CommandType.StoredProcedure;
            if (komut.Connection.State != ConnectionState.Open)
            {
                komut.Connection.Open();
            }
            SqlDataReader dr = komut.ExecuteReader();

            while (dr.Read())
            {
                ENTITYPERSONEL ent = new ENTITYPERSONEL();
                ent.Personelid       = Convert.ToInt32(dr["PERSONELID"]);
                ent.Personelad       = dr["PERSONELAD"].ToString();
                ent.Perdep           = dr["DEPARTMANAD"].ToString();
                ent.Personelfotograf = dr["PERSONELFOTOGRAF"].ToString();
                ent.Personelsoyad    = dr["PERSONELSOYAD"].ToString();
                ent.Personelmaas     = Convert.ToDecimal(dr["PERSONELMAAS"]);
                degerler.Add(ent);
            }
            dr.Close();
            return(degerler);
        }
 public static int PERSONELEKLE(ENTITYPERSONEL p)
 {
     if (p.Personelad != null)
     {
         DALPERSONEL.PERSONELEKLE(p);
     }
     return(-1);
 }
Esempio n. 3
0
        protected void Unnamed1_Click(object sender, EventArgs e)
        {
            ENTITYPERSONEL ent = new ENTITYPERSONEL();

            ent.Personelad        = TextBox1.Text;
            ent.Personelsoyad     = TextBox2.Text;
            ent.Personelmaas      = Convert.ToDecimal(TextBox3.Text);
            ent.Personeldepartman = Convert.ToByte(DropDownList1.SelectedValue);

            BLLPERSONEL.PERSONELEKLE(ent);
            Response.Redirect("Personel.aspx");
        }
        protected void Unnamed1_Click(object sender, EventArgs e)
        {
            ENTITYURUN     ent  = new ENTITYURUN();
            ENTITYPERSONEL ent1 = new ENTITYPERSONEL();
            ENTITYMUSTERI  ent2 = new ENTITYMUSTERI();
            ENTITYSATIS    ent3 = new ENTITYSATIS();

            DropDownList1.DataValueField = "URUNID";

            ent.Urunid      = Convert.ToInt32(DropDownList1.SelectedIndex);
            ent1.Personelid = Convert.ToInt32(DropDownList2.SelectedIndex);
            ent2.Musteriid  = Convert.ToInt32(DropDownList3.SelectedIndex);
            ent3.TUTAR      = Convert.ToDecimal(TextBox1.Text);
            BALSATIS.SATISYAP(ent2, ent, ent1, ent3);
        }
        public static int SATISYAP(ENTITYMUSTERI mus, ENTITYURUN ur, ENTITYPERSONEL per, ENTITYSATIS sat)
        {
            SqlCommand komut = new SqlCommand("INSERT INTO TBlSATIS(URUN,PERSONEL,TUTAR,MUSTERI) values(@p1,@p2,@p3,@p4)", SQLBAGLANTISI.bgl);

            if (komut.Connection.State != ConnectionState.Open)
            {
                komut.Connection.Open();
            }
            komut.Parameters.AddWithValue("@p1", mus.Musteriid);
            komut.Parameters.AddWithValue("@p2", ur.Urunid);
            komut.Parameters.AddWithValue("@p3", sat.TUTAR);
            komut.Parameters.AddWithValue("@p4", mus.Musteriid);

            return(komut.ExecuteNonQuery());
        }
Esempio n. 6
0
        public static int PERSONELEKLE(ENTITYPERSONEL p)
        {
            SqlCommand komut = new SqlCommand("INSERT INTO TBLPERSONEL (PERSONELAD,PERSONELSOYAD,PERSONELDEPARTMAN,PERSONELMAAS)VALUES(@P1,@P2,@P3,@P4)", SQLBAGLANTISI.bgl);

            if (komut.Connection.State != ConnectionState.Open)
            {
                komut.Connection.Open();
            }
            komut.Parameters.AddWithValue("@P1", p.Personelad);
            komut.Parameters.AddWithValue("@P2", p.Personelsoyad);
            komut.Parameters.AddWithValue("@P3", p.Personeldepartman);
            komut.Parameters.AddWithValue("@P4", p.Personelmaas);


            return(komut.ExecuteNonQuery());
        }
Esempio n. 7
0
 public static int SATISYAP(ENTITYMUSTERI MUS, ENTITYURUN UR, ENTITYPERSONEL PER, ENTITYSATIS SAT)
 {
     return(DALSATIS.SATISYAP(MUS, UR, PER, SAT));
 }