• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# BusinessLayer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BusinessLayer的典型用法代码示例。如果您正苦于以下问题:C# BusinessLayer类的具体用法?C# BusinessLayer怎么用?C# BusinessLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BusinessLayer类属于命名空间,在下文中一共展示了BusinessLayer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InsertLog

        public  DataAccessLayer.SOAResult InsertLog ( BusinessLayer.Log log)
        {

            // First check if this record exists in the SQLite

            using (var contents =  SQLiteUtilities.MainSQLiteConnection.CreateCommand ()) 
            {

                using (var c = SQLiteUtilities.MainSQLiteConnection.CreateCommand ()) 
                {
                    c.CommandText = "INSERT INTO[Log] ([Date], [LogText]) VALUES ('" + log.Date + "', '" +
                        log.LogText + "')";
                    try
                    {
                        var rowcount = c.ExecuteNonQuery (); // rowcount will be 1
                        if (rowcount == 1)
                            return  DataAccessLayer.SOAResult.TRUE;
                        else
                            return  DataAccessLayer.SOAResult.FALSE;
                    }
                    catch(Exception ex)
                    {
                        DataAccessLayer.ExceptionWriter.WriteLogFile(ex);
                        return DataAccessLayer.SOAResult.FALSE;
                    }

                }

            }

        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:31,代码来源:DAL_Log.cs


示例2: GetAnfragen

        public System.Collections.Generic.List<BusinessLayer.Anfrage>    GetAnfragen (string lieferantenId, string deviceLanguage , ref BusinessLayer.User user)
        {
            // First check for the network status
            if (user.NetworkStatus == NetworkState.Disconnected)
                return GetAnfragen (lieferantenId, deviceLanguage, ref user, true);

            Stream dataStream;

            // Use the ServiceManager to build send the data to the SOA services            
            // The ServiceManager is responsible to send the data to the SOA services       
            // Run the service and return the value as a Datastream 
            // EXECUSERPERMISSION.JSON

            SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/anfragen.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);                  

            // Add the Values                           
            sm.AddCriteriaValue ("KundeID", lieferantenId);
            sm.AddCriteriaValue ("Mandant", user.Mandant);
            sm.AddCriteriaValue ("Sprache", deviceLanguage);

            // Now it's show time   
            dataStream = sm.CommitPost ();                                                  

            if (dataStream == null)
                return null;

            StreamReader reader = new StreamReader(dataStream);
            if (reader == null)
                return null;

            string jsonText = reader.ReadToEnd ();

            return  Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.Anfrage>> (jsonText);

        }
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:35,代码来源:DAL_Anfrage.cs


示例3: SetControls

 /// <summary>
 /// Sets the controls.
 /// </summary>
 /// <param name="anschrift">Anschrift.</param>
 /// <param name="image">Image.</param>
 public void SetControls(BusinessLayer.Artikel artikel)
 {
     // fill the controls
     LblArtikelBez1.Text = artikel.Bez1;
     ArtikelBez2_6Label.Text = GetArtikelBez2_6(artikel);
     ArtikelNummerLabel.Text = artikel.Nummer;
 }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:12,代码来源:ArtikelCell.cs


示例4: GetTaskTyps

        public static System.Collections.Generic.List<BusinessLayer.TaskTyp>    GetTaskTyps( ref BusinessLayer.User user)
        {
            // First check for the network status
            if (user.NetworkStatus == NetworkState.Disconnected)
                return GetTaskTyps ( ref user, true);

            Stream dataStream;

            // Use the ServiceManager to build send the data to the SOA services            
            // The ServiceManager is responsible to send the data to the SOA services       
            // Run the service and return the value as a Datastream 
            // EXECUSERPERMISSION.JSON

            SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/tasktyp.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);                    


            // Now it's show time   
            dataStream = sm.CommitPost ();                                                  

            if (dataStream == null)
                return null;

            StreamReader reader = new StreamReader(dataStream);
            if (reader == null)
                return null;

            string jsonText = reader.ReadToEnd ();

            return  Newtonsoft.Json.JsonConvert.DeserializeObject<List<BusinessLayer.TaskTyp>> (jsonText);
        }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:30,代码来源:DAL_Task.cs


示例5: SetControls

 /// <summary>
 /// Sets the controls.
 /// </summary>
 /// <param name="anschrift">Anschrift.</param>
 /// <param name="image">Image.</param>
 public void SetControls(BusinessLayer.Person person)
 {
     // fill the controls
     //            MainImageView.Image = UIImage.FromFile(image);
     PersonNameLabel.Text = person.Name;
     PersonNummerLabel.Text = person.Nummer;
 }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:12,代码来源:PersonIconedCell.cs


示例6: SaveQuery

    public string SaveQuery()
    {
        string connectionString = ConfigurationManager.AppSettings.Get("connString");
        ListItem li = new ListItem();
        string symptoms = string.Empty ;

        Query queryObj = new Query();
        int i = 0; int counter = 0;

        int max = counter;
        counter = 0;

        queryObj.Username = Session["Username"].ToString();
        queryObj.QueryAreaOfInterest = ddlInterestList.SelectedItem.Value;
        queryObj.Symptoms = txtSymptoms.Text;
        queryObj.MedicalHistory = txtMedHistory.Text;
        queryObj.Status = "Unanswered";
        queryObj.IsAttendedTo = false;
        queryObj.PostedDatetime = DateTime.Now;

        //passing to business layer

        //string message;
        BusinessLayer businessLayerObj = new BusinessLayer();
        try
        {
            businessLayerObj.InsertQuery(queryObj, connectionString);
        }
        catch(Exception ex)
        {
            return ex.Message;
        }

        return "noerror";
    }
开发者ID:san2488,项目名称:medicopedia,代码行数:35,代码来源:SubmitQuery.ascx.cs


示例7: InsertDetail

 //
 public void InsertDetail(BusinessLayer.NhanVienBsn nhanvien)
 {
     try
     {
         SqlCommand cmd = new SqlCommand();
         cmd.CommandType = CommandType.Text;
         cmd.CommandText = "INSERT INTO " + this.tableName
             + "(" + this.fieldList + ") VALUES ('"
             + nhanvien.TeNV + "','" + nhanvien.Diachi + "','" + nhanvien.Ngaysinh.ToShortDateString() + "'," + Convert.ToInt32(nhanvien.Giotinh) + ",'" + nhanvien.Dienthoai + "'," + nhanvien.MaCV + "," + nhanvien.MaLuong + ",'" + nhanvien.SoBH + "',"+nhanvien.MaPhong+"," + nhanvien.MaCM + "," + nhanvien.MaTD + ")";
         dt = new DataTable();
         dt = GetData(cmd);
        
         MessageBox.Show("thêm m?i thành công", "Thông báo");
         //conn.Close();
     }
     catch (Exception)
     {
         MessageBox.Show("B? trùng khóa, thêm m?i th?t b?i", "Thông báo");
     }
     finally
     {
         closeConnect();
         // conn.Close();
     }
 }
开发者ID:thanphong,项目名称:hospitalmanager-project,代码行数:26,代码来源:NhanVienData.cs


示例8: GetUmsatz

        public string GetUmsatz(string id, ref BusinessLayer.User user)
        {
            // First we test if the networkstatus is disconnected or not
            if (user.NetworkStatus == NetworkState.Disconnected)
                return GetUmsatz (id, ref user, true);

            Stream dataStream;

            // Use the ServiceManager to build send the data to the SOA services			
            // The ServiceManager is responsible to send the data to the SOA services 		
            // Run the service and return the value as a Datastream	
            // EXECUSERPERMISSION.JSON

            SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/getpersonumsatz.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);

            // Add the Values 							
            sm.AddCriteriaValue("ID", id);
            sm.AddCriteriaValue("Mandant", user.Mandant);
            sm.AddCriteriaValue("Bereich", "8");

            // Now it's show time	
            dataStream = sm.CommitPost();
            if (dataStream == null)
                return "0";

            StreamReader reader = new StreamReader(dataStream);
            string jsonText = reader.ReadToEnd();


            return  jsonText.Trim();

        }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:32,代码来源:DAL_Lieferant.cs


示例9: GetTownViaPLZ

        public static string GetTownViaPLZ (string PLZ, ref BusinessLayer.User user)
		{
			Stream dataStream;

			// Use the ServiceManager to build send the data to the SOA services			
			// The ServiceManager is responsible to send the data to the SOA services 		
			// Run the service and return the value as a Datastream	
			// EXECUSERPERMISSION.JSON

			SOAServiceManager sm = new SOAServiceManager (DataAccessLayer.Utilities.ServerIP + "/GetTownViaPLZ.json",user.IdSession, DataAccessLayer.HTTPMethod.POST);					

			// Add the Values 							
			sm.AddCriteriaValue ("PLZ", PLZ);

			// Now it's show time	
            dataStream = sm.CommitPost ();													

            if (dataStream == null)
                return "";
            
            StreamReader reader = new StreamReader(dataStream);
			string jsonText = reader.ReadToEnd ();		

			/*	JavaScriptSerializer js = new JavaScriptSerializer();
			Person [] persons =  js.Deserialize<Person[]>(json);
*/

			return   jsonText.Trim ();
		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:29,代码来源:DAL_Lieferant.cs


示例10: SaveAdvice

    public string SaveAdvice()
    {
        string connectionString = ConfigurationManager.AppSettings.Get("connString");
        Advice adviceObj = new Advice();

        //creating an advice object
        adviceObj.QueryId = Convert.ToInt32(Request.QueryString["QueryId"]);

        adviceObj.Username = Session["Username"].ToString() ;

        adviceObj.Likes = 0;

        adviceObj.Dislikes = 0;

        adviceObj.AdviceTitle = txtAdviceTitle.Text;

        adviceObj.AdviceDescription = txtAdvice.Text;

        adviceObj.AdviceDateTime = DateTime.Now;

        //inserting data through business layer
        BusinessLayer businessLayerObj = new BusinessLayer();

        try
        {
            businessLayerObj.InsertAdvice(adviceObj, connectionString);
        }
        catch(Exception ex)
        {
            return ex.Message;
        }

        return "noerror";
    }
开发者ID:san2488,项目名称:medicopedia,代码行数:34,代码来源:SubmitAdvice.ascx.cs


示例11: ajouterLivre

        /// <summary>
        /// Contructeur d'un fenètre d'ajout
        /// </summary>
        /// <param name="biblio"> Bibliothèque utilisée</param>
        /// <param name="ih"> Ihm principale </param>
        public ajouterLivre(BusinessLayer.Metier.Bibliotheque biblio, IHM ih)
        {
            _biblio = biblio;
            InitializeComponent();

            // Remplir le comboBoxAuteur et editeur
            foreach (IAuteur auteur in _biblio.Ecrivain)
            {
                comboBoxAuteur.Items.Add(auteur);

            }
            foreach (IEditeur edit in _biblio.Editeur)
            {
                comboBoxEditeur.Items.Add(edit);

            }
            foreach (IGenre genre in _biblio.Genre)
            {
                comboBoxGenre.Items.Add(genre);

            }

            modif = false;
            _ihm = ih;
            ih.Enabled = false;
        }
开发者ID:ulricheza,项目名称:Isima,代码行数:31,代码来源:ajouterLivre.cs


示例12: AdminDoctorView_RowUpdating

 protected void AdminDoctorView_RowUpdating(object sender, GridViewUpdateEventArgs e)
 {
     BusinessLayer businessLyerObj = new BusinessLayer();
     string connectString = ConfigurationManager.AppSettings.Get("connString");
     int index = e.RowIndex;
     businessLyerObj.ApproveDoctor(AdminDoctorView.DataKeys[index].Value.ToString(), connectString);
 }
开发者ID:san2488,项目名称:medicopedia,代码行数:7,代码来源:AdminHome.aspx.cs


示例13: Create

        public static Kunde Create(string id , string deviceLanguage ,ref BusinessLayer.User user)
		{
			// das Objekt wird mit einem vorhandenen Kunden initializiert
			DataAccessLayer.DAL_Kunde dal_Kunde = new DataAccessLayer.DAL_Kunde ();
            var kunde = dal_Kunde.GetKunde (id, deviceLanguage, ref user);
			return kunde;

		} 
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:8,代码来源:Kunde.cs


示例14: SetControls

        public void SetControls(BusinessLayer.Artikel.StaffelPreis staffelPreis, string image)
        {

            MainImageView.Image = UIImage.FromFile(image);
            LblMengeEinheit.Text = staffelPreis.Menge + " " + staffelPreis.Einheit;
            LblDatum.Text = staffelPreis.Datum;
            LblPreis.Text = staffelPreis.Preis + " " + staffelPreis.Waehrung;
        }
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:8,代码来源:ArtikelStaffelPreisCell.cs


示例15: Create

        public static Interessent Create(string id , string deviceLanguage ,ref BusinessLayer.User user)
        {
            // das Objekt wird mit einem vorhandenen Interessenten initializiert
            DataAccessLayer.DAL_Interessent dal_Interessent = new DataAccessLayer.DAL_Interessent ();
            var interessent = dal_Interessent.GetInteressent (id, deviceLanguage, ref user);
            return interessent;

        } 
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:8,代码来源:Interessent.cs


示例16: AdminUserView_RowDeleting

 protected void AdminUserView_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     //Datakey is retrieved using AdminDoctorView.DataKeys[0].Value
     BusinessLayer businessLyerObj = new BusinessLayer();
     string connectString = ConfigurationManager.AppSettings.Get("connString");
     int index = e.RowIndex + (AdminUserView.PageIndex * 4);
     businessLyerObj.DeleteUser(AdminUserView.DataKeys[index].Value.ToString(), connectString);
 }
开发者ID:san2488,项目名称:medicopedia,代码行数:8,代码来源:AdminHome.aspx.cs


示例17: GetKundenAsync

        public static async System.Threading.Tasks.Task<List<Kunde>>   GetKundenAsync( string Name ,  string deviceLanguage ,BusinessLayer.User User)
		{

			DataAccessLayer.DAL_Kunde dal_Kunde = new DataAccessLayer.DAL_Kunde ();
            var kunden =await dal_Kunde.GetKundenAsync (Name, deviceLanguage,  User);
			return kunden;

		}
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:8,代码来源:Kunde.cs


示例18: TVMainRowSelected

		public void TVMainRowSelected(BusinessLayer.Person person)
		{
			// Fill the main Controls of the page
			_person = person;
			FillControls (person);
			// Fill the childview controls

		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:8,代码来源:VCDetailsKunde.cs


示例19: Create

        public static Lieferant Create(string id , string deviceLanguage ,ref BusinessLayer.User user)
		{
			// das Objekt wird mit einem vorhandenen Lieferantn initializiert
			DataAccessLayer.DAL_Lieferant dal_Lieferant = new DataAccessLayer.DAL_Lieferant ();
			var lieferant = dal_Lieferant.GetLieferant (id, deviceLanguage, ref user);
			return lieferant;

		} 
开发者ID:MbProg,项目名称:TestApolloAndroid,代码行数:8,代码来源:Lieferant.cs


示例20: FillControls

		public void FillControls(BusinessLayer.Person person)
		{
			TxtMainName.Text = person.Name;
			TxtMainEmail.Text = person.Email;
			TxtMainTelefon.Text = person.Telefon;
			TxtMainUmsatz.Text = person.Umsatz;

		}
开发者ID:MbProg,项目名称:MasterDetailTestProject-IOS-64,代码行数:8,代码来源:VCDetailsKunde.cs



注:本文中的BusinessLayer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BusinessLogic类代码示例发布时间:2022-05-24
下一篇:
C# BusinessDayConvention类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap