当前位置: 首页>>代码示例>>C#>>正文


C# Staff.ExecuteStatement方法代码示例

本文整理汇总了C#中Staff.ExecuteStatement方法的典型用法代码示例。如果您正苦于以下问题:C# Staff.ExecuteStatement方法的具体用法?C# Staff.ExecuteStatement怎么用?C# Staff.ExecuteStatement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Staff的用法示例。


在下文中一共展示了Staff.ExecuteStatement方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateICS_Material

 private bool UpdateICS_Material(String my_MaterialID, String my_MaterialName, String my_SystemQuantity, TextBox my_RealQuantity, String my_MaterialCost)
 {
     Staff _operator = new Staff("Company");
     float a = Convert.ToSingle(my_SystemQuantity);
     float b = Convert.ToSingle(my_RealQuantity.Text);
     float c = Convert.ToSingle(my_MaterialCost);
     int mat = Convert.ToInt32(my_MaterialID);
     string sql = "INSERT INTO [MROS].[dbo].[ICS_ReInventory]([MaterialID],[MaterialName],[SystemQuantity],[RealQuantity],[RelnventoryQuantity],[MaterialCost],[RelnventoryCost],[RelnventoryDate],[UpdateTime],[UpdateUser]) " +
                  " VALUES('" + mat + "','" + my_MaterialName + "','" + my_SystemQuantity + "','" + my_RealQuantity.Text + "','" + (a - b) + "','" + my_MaterialCost + "' ,'" + (b * c) + " ',getdate(),getdate(),'admin')";
     return _operator.ExecuteStatement(sql);
 }
开发者ID:hiway86,项目名称:PRS_KAO,代码行数:11,代码来源:InventoryCheck_QM.aspx.cs

示例2: Button1_Click

    protected void Button1_Click(object sender, EventArgs e)
    {
        Staff _operator = new Staff("Company");
        //物料名稱
        String my_MaterialName = txt_MaterialName.Text;
        //物料單位
        String my_MaterialUnit = txt_MaterialUnit.Text;
        //安全存量
        String my_MaterialSafeQuantity = txt_MaterialSafeQuantity.Text;
        //更新人員
        String USER;
        if (Session["UserID"] != null)
        {
            USER = Session["UserID"].ToString();
        }
        else
        {
            USER = "admin";
        }
        if (hidden_Action.Value == "add")
        {
            string sql = "INSERT INTO ICS_Material (MaterialName,MaterialUnit,MaterialSafeQuantity,UpdateTime,UpdateUser,MaterialTypeID) VALUES  ('" + my_MaterialName.ToString() + "','" + my_MaterialUnit.ToString() + "','" + my_MaterialSafeQuantity.ToString() + "',getdate(),'" + USER + "','" + cbo_materialType.SelectedValue + "')  ";
            if (_operator.ExecuteStatement(sql))
            {
                ShowMsg2(UpdatePanel1, "儲存成功");
                UpdateServerData(); //更新Application Data
                Response.AddHeader("Refresh", "3; url=Inventory_AQM.aspx");
            }
            else
            {
                ShowMsg2(UpdatePanel1, "儲存失敗");

            }
        }
        else
        {
            SQLDB db = new SQLDB();
            DataSet ds = new DataSet();
            ds = db.Select("NO = '"+hidden_Materialid.Value+"'","","ICS_Material");
            DataRow dr = ds.Tables[0].Rows[0];
            dr["MaterialName"] = my_MaterialName.ToString();
            dr["MaterialUnit"] = my_MaterialUnit.ToString();
            dr["MaterialSafeQuantity"] = my_MaterialSafeQuantity.ToString();
            dr["UpdateTime"] = DateTime.Now;
            dr["UpdateUser"] = USER;
            dr["MaterialTypeID"] = cbo_materialType.SelectedValue;
            DataSet DSChange = ds.GetChanges(DataRowState.Modified);
            //string sql = "UPDATE from ICS_Material (MaterialName,MaterialUnit,MaterialSafeQuantity,UpdateTime,UpdateUser,MaterialTypeID) VALUES  ('" + my_MaterialName.ToString() + "','" + my_MaterialUnit.ToString() + "','" + my_MaterialSafeQuantity.ToString() + "',getdate(),'" + USER + "','" + cbo_materialType.SelectedValue + "')  ";
            if (db.Update(DSChange))
            {
                ShowMsg2(UpdatePanel1, "儲存成功");
                UpdateServerData(); //更新Application Data
                Response.AddHeader("Refresh", "3; url=Inventory_AQM.aspx");
            }
            else
            {
                ShowMsg2(UpdatePanel1, "儲存失敗");

            }
        }

    }
开发者ID:hiway86,项目名称:PRS_KAO,代码行数:62,代码来源:Inventoryadd_A.aspx.cs

示例3: DELICS_Material

 private bool DELICS_Material(String my_NO)
 {
     Staff _operator = new Staff("Company");
     string sql = "DELETE FROM ICS_Material WHERE NO = '" + my_NO + "'  ";
     return _operator.ExecuteStatement(sql);
 }
开发者ID:hiway86,项目名称:PRS_KAO,代码行数:6,代码来源:Inventory_AQM.aspx.cs

示例4: UpdateICS_Material

 private bool UpdateICS_Material(String my_NO, TextBox my_MaterialName, TextBox my_PurchaseUnit, TextBox my_ConsumeUnit, TextBox my_ConversionFactor, TextBox my_MaterialSafeQuantity, TextBox my_MaterialTypeID, TextBox my_MaterialUnit, TextBox my_Active)
 {
     Staff _operator = new Staff("Company");
     string sql = " UPDATE ICS_Material SET MaterialName = '" + my_MaterialName.Text + "', MaterialSafeQuantity = '" + my_MaterialSafeQuantity.Text + "'"+
                  " , MaterialUnit = '" + my_MaterialUnit.Text + "', Active = '" + my_Active.Text + "' " +
                  " WHERE NO = '" + my_NO + "' ";
     return _operator.ExecuteStatement(sql);
 }
开发者ID:hiway86,项目名称:PRS_KAO,代码行数:8,代码来源:Inventory_AQM.aspx.cs

示例5: DELICS_Material

 private bool DELICS_Material(String my_RelnventoryID)
 {
     Staff _operator = new Staff("Company");
     string sql = "DELETE FROM ICS_ReInventory WHERE RelnventoryID = '" + my_RelnventoryID + "'  ";
     return _operator.ExecuteStatement(sql);
 }
开发者ID:hiway86,项目名称:PRS_KAO,代码行数:6,代码来源:App_Web_0jpjlz4f.17.cs


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