Beispiel #1
0
        protected void SaveInfo()
        {
            Seed_Cooperative_Info info = new Seed_Cooperative_Info(int.Parse(txtKey.Text));

            info.SeedKey        = int.Parse(DLLSeeds.SelectedValue);
            info.CooperativeKey = Convert.ToInt16(Session["CooperativeKey"]);
            info.Price          = txtPrice.Text.Tofloat();
            SessionUserLogin nUserLogin = (SessionUserLogin)Session["UserLogin"];

            if (txtKey.Text.ToInt() == 0)
            {
                info.CreatedBy       = info.ModifiedBy = new Guid(nUserLogin.Key);
                info.CreatedDateTime = info.ModifiedDateTime = DateTime.Now;
            }
            else
            {
                info.ModifiedBy       = new Guid(nUserLogin.Key);
                info.ModifiedDateTime = DateTime.Now;
            }
            info.Save();
        }