コード例 #1
0
        protected void btnAddSampleFromCustomer_Click(object sender, EventArgs e)
        {
            SampleProvid sample = new SampleProvid()
            {
                CreatedAt       = DateTime.Now,
                CreatedBy       = SMSContext.Current.User.UserName,
                SampleDirection = SysConst.SampleDirectionFrom,
                SampleIntro     = txtSampleFromCustomerIntro.Text,
                SampleName      = ddlProductFrom.SelectedItem.Text,
                SourceNo        = SourceNo,
                SourceType      = SourceType
            };
            SampleProvidDAL dal = new SampleProvidDAL();

            dal.AddSample(sample);
            dal.Save();
            BindControl();
            SetFocus(sender);
        }
コード例 #2
0
 public void AddSample(SampleProvid sample)
 {
     Db.SampleProvid.AddObject(sample);
 }